Skip to content

Commit e27d106

Browse files
nafmospearce
authored andcommitted
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 <[email protected]> Signed-off-by: Shawn O. Pearce <[email protected]>
1 parent 3c6a287 commit e27d106

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

git-gui.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1941,7 +1941,7 @@ proc do_gitk {revs} {
19411941
cd [file dirname [gitdir]]
19421942
set env(GIT_DIR) [file tail [gitdir]]
19431943
1944-
eval exec $cmd $revs &
1944+
eval exec $cmd $revs "--" "--" &
19451945
19461946
if {$old_GIT_DIR eq {}} {
19471947
unset env(GIT_DIR)

0 commit comments

Comments
 (0)