Skip to content

Commit ad1c660

Browse files
committed
Merge git://repo.or.cz/git-gui
* git://repo.or.cz/git-gui: git-gui: tolerate major version changes when comparing the git version git-gui: show staged submodules regardless of ignore config
2 parents c47372d + 3decb8e commit ad1c660

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

git-gui/git-gui.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1558,7 +1558,11 @@ proc rescan_stage2 {fd after} {
15581558
15591559
set rescan_active 2
15601560
ui_status [mc "Scanning for modified files ..."]
1561-
set fd_di [git_read diff-index --cached -z [PARENT]]
1561+
if {[git-version >= "1.7.2"]} {
1562+
set fd_di [git_read diff-index --cached --ignore-submodules=dirty -z [PARENT]]
1563+
} else {
1564+
set fd_di [git_read diff-index --cached -z [PARENT]]
1565+
}
15621566
set fd_df [git_read diff-files -z]
15631567
15641568
fconfigure $fd_di -blocking 0 -translation binary -encoding binary

git-gui/lib/diff.tcl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,9 @@ proc start_show_diff {cont_info {add_opts {}}} {
287287
if {$w eq $ui_index} {
288288
lappend cmd diff-index
289289
lappend cmd --cached
290+
if {[git-version >= "1.7.2"]} {
291+
lappend cmd --ignore-submodules=dirty
292+
}
290293
} elseif {$w eq $ui_workdir} {
291294
if {[string first {U} $m] >= 0} {
292295
lappend cmd diff

0 commit comments

Comments
 (0)