git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Krefting <peter@softwolves.pp.se>
To: Git Mailing List <git@vger.kernel.org>
Subject: [GIT-GUI PATCH] Correctly launch gitk for branch whose name matches a local file
Date: Thu, 21 Jan 2010 13:15:17 +0100	[thread overview]
Message-ID: <20100121121848.BE37D2FC47@perkele> (raw)

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>
---
 git-gui.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Reproducible test case:

1. git clone git://git.debian.org/users/peterk/lyskom-server.git
2. cd lyskom-server
3. git gui + "Visualize debian's history"

diff --git a/git-gui.sh b/git-gui.sh
index 822d598..2114945 100755
--- a/git-gui.sh
+++ b/git-gui.sh
@@ -1941,7 +1941,7 @@ proc do_gitk {revs} {
 		cd [file dirname [gitdir]]
 		set env(GIT_DIR) [file tail [gitdir]]
 
-		eval exec $cmd $revs &
+		eval exec $cmd $revs "--" "--" &
 
 		if {$old_GIT_DIR eq {}} {
 			unset env(GIT_DIR)
-- 
1.6.6

             reply	other threads:[~2010-01-21 13:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-21 12:15 Peter Krefting [this message]
2010-01-23 22:41 ` [GIT-GUI PATCH] Correctly launch gitk for branch whose name matches a local file Shawn O. Pearce

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100121121848.BE37D2FC47@perkele \
    --to=peter@softwolves.pp.se \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).