Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
gitk: Simplify file filtering
author
Felipe Contreras
<felipe.contreras@gmail.com>
Sat, 27 Apr 2013 22:01:39 +0000
(17:01 -0500)
committer
Paul Mackerras
<paulus@samba.org>
Sat, 11 May 2013 07:37:08 +0000
(17:37 +1000)
git diff is perfectly able to do this with '-- files', no need for
manual filtering. This makes gettreediffs consistent with getblobdiffs.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
gitk
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
685316c
)
diff --git
a/gitk
b/gitk
index 8d0501b48f9f295d4b1fb2757f3f19bbd99e0cc5..b80a805e41d03a9456efd170a5e0d03e9bd9fa48 100755
(executable)
--- a/
gitk
+++ b/
gitk
@@
-7618,9
+7618,13
@@
proc diffcmd {ids flags} {
}
proc gettreediffs {ids} {
}
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 {}
set treepending $ids
set treediff {}
@@
-7664,17
+7668,7
@@
proc gettreediffline {gdtf ids} {
return [expr {$nr >= $max? 2: 1}]
}
close $gdtf
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
unset treepending
if {$cmitmode eq "tree" && [llength $diffids] == 1} {
gettree $diffids