From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Pat Thoyts <patthoyts@googlemail.com>, Paul Mackerras <paulus@samba.org>
Cc: Kirill <kirillathome@gmail.com>,
msysgit@googlegroups.com, git@vger.kernel.org
Subject: [GITK PATCH 3/3] gitk: strip prefix from filenames in subdirectories
Date: Tue, 23 Feb 2010 18:12:35 +0100 (CET) [thread overview]
Message-ID: <alpine.DEB.1.00.1002231811021.3980@intel-tinevez-2-302> (raw)
In-Reply-To: <alpine.DEB.1.00.1002231810020.3980@intel-tinevez-2-302>
Again in the lower right panel, where the file names of the files touched
by the current commit are clickable: let's not show the prefix when we
are in a subdirectory, as it wastes precious screen estate conveying
information the user already knows.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
Sorry, I tested 1/3 only in the gitk-git/ subdirectory. And of
course, I was bitten by the fact that this subdirectory is pulled
using the subtree strategy, so there are files in the history
which lack the prefix. Therefore, I saw the files even if the fix
was incomplete.
gitk-git/gitk | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/gitk-git/gitk b/gitk-git/gitk
index bad9ebc..0b2c351 100644
--- a/gitk-git/gitk
+++ b/gitk-git/gitk
@@ -3203,10 +3203,14 @@ proc unhighlight_filelist {} {
}
proc add_flist {fl} {
- global cflist
+ global cflist pathprefix
$cflist conf -state normal
+ set l [string length $pathprefix]
foreach f $fl {
+ if {$l > 0 && [string compare -length $l $pathprefix $f] == 0} {
+ set f [string range $f $l end]
+ }
$cflist insert end "\n"
$cflist insert end $f [highlight_tag $f]
}
--
1.6.4.297.gcb4cc
next prev parent reply other threads:[~2010-02-23 17:12 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <f579dd581002200847o340a3eb9l50d0f1329d4e2c23@mail.gmail.com>
[not found] ` <alpine.DEB.1.00.1002201847290.20986@pacific.mpi-cbg.de>
[not found] ` <a5b261831002200948v3c01708dv3e42d08d42e3119@mail.gmail.com>
[not found] ` <alpine.DEB.1.00.1002201920350.20986@pacific.mpi-cbg.de>
2010-02-23 16:51 ` [GITK PATCH] gitk: support "gitk <tracheophyte> -- ." Johannes Schindelin
2010-02-23 17:10 ` [GITK PATCH 2/3] gitk: support path filters even in subdirectories Johannes Schindelin
2010-02-23 17:12 ` Johannes Schindelin [this message]
2010-02-23 19:42 ` [GITK PATCH 3/3] gitk: strip prefix from filenames " Kirill
2010-02-23 20:50 ` Johannes Schindelin
2010-02-23 22:20 ` Kirill
2010-02-23 19:37 ` [GITK PATCH 2/3] gitk: support path filters even " Kirill
2010-02-23 20:22 ` Johannes Schindelin
2010-02-25 1:51 ` Pat Thoyts
2010-02-25 14:22 ` Johannes Schindelin
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.1.00.1002231811021.3980@intel-tinevez-2-302 \
--to=johannes.schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=kirillathome@gmail.com \
--cc=msysgit@googlegroups.com \
--cc=patthoyts@googlemail.com \
--cc=paulus@samba.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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).