Transaction.push_patch(): Set self.head only when we have a merge conflict
authorKarl Hasselström <kha@treskal.com>
Fri, 22 May 2009 20:35:25 +0000 (22:35 +0200)
committerKarl Hasselström <kha@treskal.com>
Fri, 22 May 2009 20:36:13 +0000 (22:36 +0200)
commitf4893b17323f7d6a62790f38e4929f9ea75e42e4
treef959c6d096adc707bad58e28d0348af690dda8e6
parent3a5a54ec47182d6b7a1f9c681a090e097b7a6751
Transaction.push_patch(): Set self.head only when we have a merge conflict

Setting self.head when we don't have a merge conflict is a harmless
no-op---as long as we set it to the commit that was going to be the
stack top anyway---so this patch should not change the behavior. But
it's not really nice to do it unconditionally, especially considering
that we want people to be able to understand what the code does ...

Also add a comment that explains why we set it, since the logic is
rather more hairy than I'd like.

Signed-off-by: Karl Hasselström <kha@treskal.com>
stgit/lib/transaction.py