All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] gitk: simplify file filtering
@ 2013-04-27 22:01 Felipe Contreras
  2013-05-11  9:42 ` Paul Mackerras
  0 siblings, 1 reply; 8+ messages in thread
From: Felipe Contreras @ 2013-04-27 22:01 UTC (permalink / raw)
  To: git; +Cc: Paul Mackerras, Jens Lehmann, Felipe Contreras

git diff is perfectly able to do this with '-- files', no need for
manual filtering.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 gitk-git/gitk | 20 +++++++-------------
 1 file changed, 7 insertions(+), 13 deletions(-)

diff --git a/gitk-git/gitk b/gitk-git/gitk
index b3706fc..0863877 100755
--- a/gitk-git/gitk
+++ b/gitk-git/gitk
@@ -7571,9 +7571,13 @@ proc diffcmd {ids flags} {
 }
 
 proc gettreediffs {ids} {
-    global treediff treepending
+    global treediff treepending limitdiffs vfilelimit curview
 
-    if {[catch {set gdtf [open [diffcmd $ids {--no-commit-id}] r]}]} return
+    set cmd [diffcmd $ids {--no-commit-id}]
+    if {$limitdiffs && $vfilelimit($curview) ne {}} {
+	    set cmd [concat $cmd -- $vfilelimit($curview)]
+    }
+    if {[catch {set gdtf [open $cmd r]}]} return
 
     set treepending $ids
     set treediff {}
@@ -7617,17 +7621,7 @@ proc gettreediffline {gdtf ids} {
 	return [expr {$nr >= $max? 2: 1}]
     }
     close $gdtf
-    if {$limitdiffs && $vfilelimit($curview) ne {}} {
-	set flist {}
-	foreach f $treediff {
-	    if {[path_filter $vfilelimit($curview) $f]} {
-		lappend flist $f
-	    }
-	}
-	set treediffs($ids) $flist
-    } else {
-	set treediffs($ids) $treediff
-    }
+    set treediffs($ids) $treediff
     unset treepending
     if {$cmitmode eq "tree" && [llength $diffids] == 1} {
 	gettree $diffids
-- 
1.8.2.1.1031.g2ee5873

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] gitk: simplify file filtering
  2013-04-27 22:01 [PATCH] gitk: simplify file filtering Felipe Contreras
@ 2013-05-11  9:42 ` Paul Mackerras
  2013-05-12 22:54   ` Junio C Hamano
  0 siblings, 1 reply; 8+ messages in thread
From: Paul Mackerras @ 2013-05-11  9:42 UTC (permalink / raw)
  To: Felipe Contreras; +Cc: git, Jens Lehmann

On Sat, Apr 27, 2013 at 05:01:39PM -0500, Felipe Contreras wrote:
> git diff is perfectly able to do this with '-- files', no need for
> manual filtering.
> 
> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>

Thanks, applied, with the commit message expanded to say that this
makes gettreediffs do the same as getblobdiffs.

Paul.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] gitk: simplify file filtering
  2013-05-11  9:42 ` Paul Mackerras
@ 2013-05-12 22:54   ` Junio C Hamano
  2013-05-13  0:36     ` Paul Mackerras
  2013-05-13 11:34     ` Paul Mackerras
  0 siblings, 2 replies; 8+ messages in thread
From: Junio C Hamano @ 2013-05-12 22:54 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: Felipe Contreras, git, Jens Lehmann

Paul Mackerras <paulus@samba.org> writes:

> On Sat, Apr 27, 2013 at 05:01:39PM -0500, Felipe Contreras wrote:
>> git diff is perfectly able to do this with '-- files', no need for
>> manual filtering.
>> 
>> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
>
> Thanks, applied, with the commit message expanded to say that this
> makes gettreediffs do the same as getblobdiffs.
>
> Paul.

Thanks; is this the last one for this cycle and is your usual branch
ready to be pulled?

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] gitk: simplify file filtering
  2013-05-12 22:54   ` Junio C Hamano
@ 2013-05-13  0:36     ` Paul Mackerras
  2013-05-13  8:58       ` Stefan Haller
  2013-05-13 11:34     ` Paul Mackerras
  1 sibling, 1 reply; 8+ messages in thread
From: Paul Mackerras @ 2013-05-13  0:36 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Felipe Contreras, git, Jens Lehmann

On Sun, May 12, 2013 at 03:54:14PM -0700, Junio C Hamano wrote:
> Paul Mackerras <paulus@samba.org> writes:
> 
> > On Sat, Apr 27, 2013 at 05:01:39PM -0500, Felipe Contreras wrote:
> >> git diff is perfectly able to do this with '-- files', no need for
> >> manual filtering.
> >> 
> >> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
> >
> > Thanks, applied, with the commit message expanded to say that this
> > makes gettreediffs do the same as getblobdiffs.
> >
> > Paul.
> 
> Thanks; is this the last one for this cycle and is your usual branch
> ready to be pulled?

I'm still deciding whether to put in Martin Langhoff's patch with a
modified label ("changing lines matching" rather than "with changes
matching regex").  I'm leaning towards it but was waiting a little to
see if anyone had comments on the wording.  I'll decide by the end of
today and send you a pull request either way.

Thanks,
Paul.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] gitk: simplify file filtering
  2013-05-13  0:36     ` Paul Mackerras
@ 2013-05-13  8:58       ` Stefan Haller
  2013-05-13 11:37         ` Paul Mackerras
  0 siblings, 1 reply; 8+ messages in thread
From: Stefan Haller @ 2013-05-13  8:58 UTC (permalink / raw)
  To: Paul Mackerras, Junio C Hamano; +Cc: git

Paul Mackerras <paulus@samba.org> wrote:

> On Sun, May 12, 2013 at 03:54:14PM -0700, Junio C Hamano wrote:
>
> > Thanks; is this the last one for this cycle and is your usual branch
> > ready to be pulled?
> 
> I'm still deciding whether to put in Martin Langhoff's patch with a
> modified label ("changing lines matching" rather than "with changes
> matching regex").  I'm leaning towards it but was waiting a little to
> see if anyone had comments on the wording.  I'll decide by the end of
> today and send you a pull request either way.

Would you also consider Tair Sabirgaliev's v2 patch for not launching
gitk in the background on Mac? This fixes a very serious usability
problem.

  <http://permalink.gmane.org/gmane.comp.version-control.git/222243>

Thanks,
   Stefan


-- 
Stefan Haller
Berlin, Germany
http://www.haller-berlin.de/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] gitk: simplify file filtering
  2013-05-12 22:54   ` Junio C Hamano
  2013-05-13  0:36     ` Paul Mackerras
@ 2013-05-13 11:34     ` Paul Mackerras
  2013-05-13 14:53       ` Junio C Hamano
  1 sibling, 1 reply; 8+ messages in thread
From: Paul Mackerras @ 2013-05-13 11:34 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

On Sun, May 12, 2013 at 03:54:14PM -0700, Junio C Hamano wrote:
> 
> Thanks; is this the last one for this cycle and is your usual branch
> ready to be pulled?

It is now; please pull from the usual place,
git://ozlabs.org/~paulus/gitk.git.

Thanks,
Paul.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] gitk: simplify file filtering
  2013-05-13  8:58       ` Stefan Haller
@ 2013-05-13 11:37         ` Paul Mackerras
  0 siblings, 0 replies; 8+ messages in thread
From: Paul Mackerras @ 2013-05-13 11:37 UTC (permalink / raw)
  To: Stefan Haller; +Cc: Junio C Hamano, git

On Mon, May 13, 2013 at 10:58:49AM +0200, Stefan Haller wrote:
> 
> Would you also consider Tair Sabirgaliev's v2 patch for not launching
> gitk in the background on Mac? This fixes a very serious usability
> problem.
> 
>   <http://permalink.gmane.org/gmane.comp.version-control.git/222243>

Yes, I put it in.  I didn't see it when he posted because my spam
filters decided it was spam. :)

Paul.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] gitk: simplify file filtering
  2013-05-13 11:34     ` Paul Mackerras
@ 2013-05-13 14:53       ` Junio C Hamano
  0 siblings, 0 replies; 8+ messages in thread
From: Junio C Hamano @ 2013-05-13 14:53 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: git

Paul Mackerras <paulus@samba.org> writes:

> On Sun, May 12, 2013 at 03:54:14PM -0700, Junio C Hamano wrote:
>> 
>> Thanks; is this the last one for this cycle and is your usual branch
>> ready to be pulled?
>
> It is now; please pull from the usual place,
> git://ozlabs.org/~paulus/gitk.git.
>
> Thanks,

Thanks.  Here is what I ended up with:

 Merge git://ozlabs.org/~paulus/gitk
 
 * git://ozlabs.org/~paulus/gitk:
   gitk: On OSX, bring the gitk window to front
   gitk: Add support for -G'regex' pickaxe variant
   gitk: Add menu item for reverting commits
   gitk: Simplify file filtering
   gitk: Display the date of a tag in a human-friendly way
   gitk: Improve behaviour of drop-down lists
   gitk: Move hard-coded colors to .gitk

 gitk-git/gitk | 254 +++++++++++++++++++++++++++++++++++++++++++++-------------
 1 file changed, 199 insertions(+), 55 deletions(-)

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-05-13 14:53 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-27 22:01 [PATCH] gitk: simplify file filtering Felipe Contreras
2013-05-11  9:42 ` Paul Mackerras
2013-05-12 22:54   ` Junio C Hamano
2013-05-13  0:36     ` Paul Mackerras
2013-05-13  8:58       ` Stefan Haller
2013-05-13 11:37         ` Paul Mackerras
2013-05-13 11:34     ` Paul Mackerras
2013-05-13 14:53       ` Junio C Hamano

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.