summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 54acdd9)
raw | patch | inline | side by side (parent: 54acdd9)
author | Shawn O. Pearce <spearce@spearce.org> | |
Wed, 14 Feb 2007 04:43:48 +0000 (23:43 -0500) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Wed, 14 Feb 2007 04:43:48 +0000 (23:43 -0500) |
It was pointed out on the git mailing list by Martin Koegler that
we did not show tags as possible things to merge into the current
branch. They actually are, and core Git's Grand Unified Merge
Driver will accept them just like any other commit.
So our merge dialog now requests all refs/heads, refs/remotes and
refs/tags named refs and attempts to match them against the commits
not in HEAD. One complicating factor here is that we must use the
%(*objectname) field when talking about an annotated tag, as they
will not appear in the output of rev-list.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
we did not show tags as possible things to merge into the current
branch. They actually are, and core Git's Grand Unified Merge
Driver will accept them just like any other commit.
So our merge dialog now requests all refs/heads, refs/remotes and
refs/tags named refs and attempts to match them against the commits
not in HEAD. One complicating factor here is that we must use the
%(*objectname) field when talking about an annotated tag, as they
will not appear in the output of rev-list.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
git-gui.sh | patch | blob | history |
diff --git a/git-gui.sh b/git-gui.sh
index 444cc0afc8bbae74c78289fabca9855f7777addc..f8d4db21a56b51f17ecfcc6ee04c118a20ad8f71 100755 (executable)
--- a/git-gui.sh
+++ b/git-gui.sh
pack $w.source -fill both -expand 1 -pady 5 -padx 5
set cmd [list git for-each-ref]
- lappend cmd {--format=%(objectname) %(refname)}
+ lappend cmd {--format=%(objectname) %(*objectname) %(refname)}
lappend cmd refs/heads
lappend cmd refs/remotes
+ lappend cmd refs/tags
set fr_fd [open "| $cmd" r]
fconfigure $fr_fd -translation binary
while {[gets $fr_fd line] > 0} {
set line [split $line { }]
- set sha1([lindex $line 0]) [lindex $line 1]
+ set sha1([lindex $line 0]) [lindex $line 2]
+ set sha1([lindex $line 1]) [lindex $line 2]
}
close $fr_fd
set fr_fd [open "| git rev-list --all --not HEAD"]
while {[gets $fr_fd line] > 0} {
if {[catch {set ref $sha1($line)}]} continue
- regsub ^refs/(heads|remotes)/ $ref {} ref
+ regsub ^refs/(heads|remotes|tags)/ $ref {} ref
lappend to_show $ref
}
close $fr_fd