From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Paul Mackerras <paulus@samba.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Uwe Kleine-K?nig <ukleinek@informatik.uni-freiburg.de>,
git@vger.kernel.org
Subject: [PATCH] gitk: fix for "gitk <ambiguous-name> --"
Date: Tue, 3 Jul 2007 23:55:24 +0100 (BST) [thread overview]
Message-ID: <Pine.LNX.4.64.0707032353330.4071@racer.site> (raw)
In-Reply-To: <alpine.LFD.0.98.0707031514160.9434@woody.linux-foundation.org>
[-- Attachment #1: Type: TEXT/PLAIN, Size: 1064 bytes --]
If you have an ambiguous ref, i.e. a file in the working directory bears
the same name, you have to use "--" at the end to disambiguate ref from
file. This works with "git rev-list". Make it work with gitk, too.
Noticed by Uwe Kleine-König.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
Uwe, did your name come out right? I recently had to manually fix
pine, and realised only then what a tedious work it is to teach
pine about utf-8. Hopefully it worked out.
gitk | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/gitk b/gitk
index 2d6a6ef..a248f5a 100755
--- a/gitk
+++ b/gitk
@@ -7440,7 +7440,7 @@ set cmdline_files {}
set i [lsearch -exact $revtreeargs "--"]
if {$i >= 0} {
set cmdline_files [lrange $revtreeargs [expr {$i + 1}] end]
- set revtreeargs [lrange $revtreeargs 0 [expr {$i - 1}]]
+ set revtreeargs [lrange $revtreeargs 0 $i]
} elseif {$revtreeargs ne {}} {
if {[catch {
set f [eval exec git rev-parse --no-revs --no-flags $revtreeargs]
--
1.5.3.rc0.2640.g59df9-dirty
next prev parent reply other threads:[~2007-07-03 22:55 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-03 20:23 [BUG] gitk fails with argument that is both existing directory and branch name Uwe Kleine-König
2007-07-03 21:55 ` Johannes Schindelin
2007-07-03 22:17 ` Linus Torvalds
2007-07-03 22:44 ` Johannes Schindelin
2007-07-03 22:55 ` Johannes Schindelin [this message]
2007-07-04 7:37 ` [PATCH] gitk: fix for "gitk <ambiguous-name> --" Gerrit Pape
2007-07-04 8:38 ` Uwe Kleine-König
2007-07-04 10:44 ` Paul Mackerras
2007-07-04 16:58 ` Junio C Hamano
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=Pine.LNX.4.64.0707032353330.4071@racer.site \
--to=johannes.schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=paulus@samba.org \
--cc=torvalds@linux-foundation.org \
--cc=ukleinek@informatik.uni-freiburg.de \
/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).