git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kirill <kirillathome@gmail.com>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: Pat Thoyts <patthoyts@googlemail.com>,
	Paul Mackerras <paulus@samba.org>,
	msysgit@googlegroups.com,  git@vger.kernel.org
Subject: Re: [GITK PATCH 2/3] gitk: support path filters even in  subdirectories
Date: Tue, 23 Feb 2010 14:37:37 -0500	[thread overview]
Message-ID: <f579dd581002231137t71bb034fl429fd03a2c0d681c@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.1.00.1002231810020.3980@intel-tinevez-2-302>

Hi,

Dscho, at first, thank you so much for working on the issue!
In general the series work. At least, it passes my limited testing
from the original message. However...

On Tue, Feb 23, 2010 at 12:10 PM, Johannes Schindelin wrote:
>
> Even when running inside a subdirectory, "gitk HEAD -- ." should work.
>
> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
> ---
>  gitk-git/gitk |    6 +++++-
>  1 files changed, 5 insertions(+), 1 deletions(-)
>
> diff --git a/gitk-git/gitk b/gitk-git/gitk
> index 553922f..bad9ebc 100644
> --- a/gitk-git/gitk
> +++ b/gitk-git/gitk
> @@ -7340,9 +7340,12 @@ proc startdiff {ids} {
>  }
>
>  proc path_filter {filter name} {
> +    global pathprefix
>     foreach p $filter {
>        if {$p == "."} {
> -               return 1
> +               set p $pathprefix
> +       } else {
> +               set p $pathprefix$p
>        }
>        set l [string length $p]
>        if {[string index $p end] eq "/"} {
> @@ -11585,6 +11588,7 @@ readrefs
>
>  if {$cmdline_files ne {} || $revtreeargs ne {} || $revtreeargscmd ne {}} {
>     # create a view for the files/dirs specified on the command line
> +    set pathprefix [exec git rev-parse --show-prefix]
I believe the fact that pathprefix is set only under several
conditions, the invocation without arguments is broken.

My .02

--
Kirill.

  parent reply	other threads:[~2010-02-23 19:38 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           ` [GITK PATCH 3/3] gitk: strip prefix from filenames " Johannes Schindelin
2010-02-23 19:42             ` Kirill
2010-02-23 20:50               ` Johannes Schindelin
2010-02-23 22:20                 ` Kirill
2010-02-23 19:37           ` Kirill [this message]
2010-02-23 20:22             ` [GITK PATCH 2/3] gitk: support path filters even " 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

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

  git send-email \
    --in-reply-to=f579dd581002231137t71bb034fl429fd03a2c0d681c@mail.gmail.com \
    --to=kirillathome@gmail.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --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.
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).