@matheusbsbs / matheus-bagliano / commits / e27d106ec4
Fork 0

git-gui: Fix gitk for branch whose name matches local file

When trying to run gitk on a branch name whose name matches a local file, it will toss an error saying that the name is ambiguous. Adding a pair of dashes will make gitk parse the options to the left of it as branch names. Since wish eats the first pair of dashes we throw at it, we need to add a second one to ensure they get through. Signed-off-by: Peter Krefting <peter@softwolves.pp.se> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

Peter Krefting committed Jan 21, 2010 at 13:15 UTC e27d106ec4b2f68c210703e4bfa3a0a0cf2550a4
1 file changed +1 -1
git-gui.sh
+1 -1
@@ -1941,7 +1941,7 @@ proc do_gitk {revs} {
1941 cd [file dirname [gitdir]]
1942 set env(GIT_DIR) [file tail [gitdir]]
1943
1944 - eval exec $cmd $revs &
1944 + eval exec $cmd $revs "--" "--" &
1945
1946 if {$old_GIT_DIR eq {}} {
1947 unset env(GIT_DIR)