git-gui: Show all possible branches for merge
commit349f92e3a25216b6f79c58044d74b61c89de20b8
authorShawn O. Pearce <spearce@spearce.org>
Wed, 2 May 2007 18:25:22 +0000 (2 14:25 -0400)
committerShawn O. Pearce <spearce@spearce.org>
Tue, 8 May 2007 03:35:52 +0000 (7 23:35 -0400)
tree74a18f7b83f63a16d8717272749a66d7fd0d0be5
parenta6c9b081b6860816615e84b75bbc7916aab184e9
git-gui: Show all possible branches for merge

Johannes Sixt pointed out that git-gui was randomly selecting
which branch (or tag!) it will show in the merge dialog when
more than one ref points at the same commit.  This can be a
problem for the user if they want to merge a branch, but the
ref that git-gui selected to display was actually a tag that
points at the commit at the tip of that branch.  Since the
user is looking for the branch, and not the tag, its confusing
to not find it, and worse, merging the tag causes git-merge to
generate a different message than if the branch was selected.

While I am in here and am messing around I have changed the
for-each-ref usage to take advantage of its --tcl formatting,
and to fetch the subject line of the commit (or tag) we are
looking at.  This way we could present the subject line in the
UI to the user, given them an even better chance to select
the correct branch.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
lib/merge.tcl