{"thread":{"id":"22324","subject":"[GIT-GUI PATCH] Correctly launch gitk for branch whose name matches a local file","startedAt":"2010-01-21T12:15:17Z","lastAt":"2010-01-23T22:41:31Z","messageCount":2,"participants":["Peter Krefting","Shawn O. Pearce"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"132296","messageId":"20100121121848.BE37D2FC47@perkele","threadId":"22324","inReplyTo":null,"subject":"[GIT-GUI PATCH] Correctly launch gitk for branch whose name matches a local file","fromName":"Peter Krefting","fromEmail":"peter@softwolves.pp.se","sentAt":"2010-01-21T12:15:17Z","receivedAt":"2010-01-21T12:15:17Z","isPatch":true,"sender":{"key":"peter@softwolves.pp.se","avatar":"https://avatars.githubusercontent.com/u/990764?v=4"},"body":"When trying to run gitk on a branch name whose name matches a local file,\nit will toss an error saying that the name is ambiguous. Adding a pair\nof dashes will make gitk parse the options to the left of it as branch\nnames. Since wish eats the first pair of dashes we throw at it, we need\nto add a second one to ensure they get through.\n\nSigned-off-by: Peter Krefting <peter@softwolves.pp.se>\n---\n git-gui.sh |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\nReproducible test case:\n\n1. git clone git://git.debian.org/users/peterk/lyskom-server.git\n2. cd lyskom-server\n3. git gui + \"Visualize debian's history\"\n\ndiff --git a/git-gui.sh b/git-gui.sh\nindex 822d598..2114945 100755\n--- a/git-gui.sh\n+++ b/git-gui.sh\n@@ -1941,7 +1941,7 @@ proc do_gitk {revs} {\n \t\tcd [file dirname [gitdir]]\n \t\tset env(GIT_DIR) [file tail [gitdir]]\n \n-\t\teval exec $cmd $revs &\n+\t\teval exec $cmd $revs \"--\" \"--\" &\n \n \t\tif {$old_GIT_DIR eq {}} {\n \t\t\tunset env(GIT_DIR)\n-- \n1.6.6\n"},{"id":"132512","messageId":"20100123224131.GD12679@spearce.org","threadId":"22324","inReplyTo":"20100121121848.BE37D2FC47@perkele","subject":"Re: [GIT-GUI PATCH] Correctly launch gitk for branch whose name matches a local file","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2010-01-23T22:41:31Z","receivedAt":"2010-01-23T22:41:31Z","isPatch":true,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Peter Krefting <peter@softwolves.pp.se> wrote:\n> When trying to run gitk on a branch name whose name matches a local file,\n> it will toss an error saying that the name is ambiguous. Adding a pair\n> of dashes will make gitk parse the options to the left of it as branch\n> names. Since wish eats the first pair of dashes we throw at it, we need\n> to add a second one to ensure they get through.\n> \n> Signed-off-by: Peter Krefting <peter@softwolves.pp.se>\n> ---\n>  git-gui.sh |    2 +-\n>  1 files changed, 1 insertions(+), 1 deletions(-)\n\nThanks, applied.\n \n-- \nShawn.\n"}]}