git-gui: Improve handling of merge commits.
commitf18e40a1a60d506065b6cc0e45704ce29ea0a035
authorShawn O. Pearce <spearce@spearce.org>
Tue, 21 Nov 2006 02:27:22 +0000 (20 21:27 -0500)
committerShawn O. Pearce <spearce@spearce.org>
Tue, 21 Nov 2006 05:22:33 +0000 (21 00:22 -0500)
treeefc28b56e4bbd0a453946e6dd502fcfb180f9cb1
parent375f38828e9c50ad79b6582e768db410216c2c41
git-gui: Improve handling of merge commits.

Its useful to be able to amend the last commit even if it was a merge
commit, so we really should support that in the gui.  We now do so by
making PARENT a list.  We always diff against the first parent but we
create a commit consisting of the parent(s) listed in this list, in
order.

We also should recheck the repository state during an amend.  Earlier
I was bitten by this exact bug when I switched branches through a
command prompt and then did not do a rescan in git-gui.  When I hit
"Amend Last Commit" I was surprised to see information from the prior
branch appear.  This was due to git-gui caching the data from the last
rescan and using that data form the amend data load request, rather than
the data of the current branch.

Improved error text in the dialogs used to tell the user why an amend is
being refused by git-gui.  In general this is only during an initial
commit (nothing prior to amend) and during a merge commit (it is simply
too confusing to amend the last commit while also trying to complete a
merge).

Fixed a couple of minor bugs in the pull logic.  Since this code isn't
really useful nobody has recently tested it and noticed the breakage.
It really needs to be rewritten anyway.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
git-gui