summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 87cd09f)
raw | patch | inline | side by side (parent: 87cd09f)
author | Jens Lehmann <Jens.Lehmann@web.de> | |
Sat, 23 Jan 2010 22:04:12 +0000 (23:04 +0100) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Sat, 23 Jan 2010 23:14:15 +0000 (15:14 -0800) |
Doing so is much faster and gives the same output.
Here are some numbers:
$ time git submodule summary
real 0m0.219s
user 0m0.050s
sys 0m0.111s
$ time git diff --submodule
real 0m0.012s
user 0m0.003s
sys 0m0.009s
Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Here are some numbers:
$ time git submodule summary
real 0m0.219s
user 0m0.050s
sys 0m0.111s
$ time git diff --submodule
real 0m0.012s
user 0m0.003s
sys 0m0.009s
Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
lib/diff.tcl | patch | blob | history |
diff --git a/lib/diff.tcl b/lib/diff.tcl
index 066755b864b587e073a820aa2eb729a6c930d7b0..cd5b74c7280de3471dca9669c80cd2e105cb46bd 100644 (file)
--- a/lib/diff.tcl
+++ b/lib/diff.tcl
}
}
+ if {[string match {160000 *} [lindex $s 2]]
+ || [string match {160000 *} [lindex $s 3]]} {
+ set is_submodule_diff 1
+
+ if {[git-version >= "1.6.6"]} {
+ lappend cmd --submodule
+ }
+ }
+
lappend cmd -p
lappend cmd --no-color
if {$repo_config(gui.diffcontext) >= 1} {
lappend cmd $path
}
- if {[string match {160000 *} [lindex $s 2]]
- || [string match {160000 *} [lindex $s 3]]} {
- set is_submodule_diff 1
+ if {$is_submodule_diff && [git-version < "1.6.6"]} {
if {$w eq $ui_index} {
set cmd [list submodule summary --cached -- $path]
} else {
}
} elseif {$is_submodule_diff} {
if {$line == ""} continue
- if {[regexp {^\* } $line]} {
+ if {[regexp {^Submodule } $line]} {
+ set tags d_@
+ } elseif {[regexp {^\* } $line]} {
set line [string replace $line 0 1 {Submodule }]
set tags d_@
} else {