summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b350e46)
raw | patch | inline | side by side (parent: b350e46)
author | Jens Lehmann <Jens.Lehmann@web.de> | |
Wed, 26 Aug 2009 20:25:15 +0000 (22:25 +0200) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Thu, 27 Aug 2009 00:35:16 +0000 (17:35 -0700) |
When a submodule commit had already been staged and another commit had
been checked out inside the submodule, the diff always displayed the
submodule commit log messages between the last supermodule commit and
the working tree, totally ignoring the commit in the index.
Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
been checked out inside the submodule, the diff always displayed the
submodule commit log messages between the last supermodule commit and
the working tree, totally ignoring the commit in the index.
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 ae1ea3a615f8bc4c809341ae6c6dd3fcf8a54269..d593323ae001e1a0f17e7550d52db152775e8806 100644 (file)
--- a/lib/diff.tcl
+++ b/lib/diff.tcl
if {[string match {160000 *} [lindex $s 2]]
|| [string match {160000 *} [lindex $s 3]]} {
- set cmd {submodule summary -- $current_diff_path}
+ set is_submodule_diff 1
+ if {$w eq $ui_index} {
+ set cmd {submodule summary --cached -- $current_diff_path}
+ } else {
+ set cmd {submodule summary --files -- $current_diff_path}
+ }
}
if {[catch {set fd [eval git_read --nice $cmd]} err]} {
}
set ::current_diff_inheader 0
- if {[regexp {^\* } $line]} {
- set is_submodule_diff 1
- }
# -- Automatically detect if this is a 3 way diff.
#
if {[string match {@@@ *} $line]} {set is_3way_diff 1}