Re: [GITK PATCH 2/3] gitk: support path filters even in subdirectories

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxx>
> ---
>  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.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]