Browse Source

git-gui: Correctly ignore '* Unmerged path' during diff.

If a path is really unmerged, such as because it has been deleted and
also modifed, we cannot obtain a diff for it.  Instead Git is sending
back '* Unmerged path <blah>' for file <blah>.  We should display this
line as-is as our tag selecting switches don't recognize it.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
maint
Shawn O. Pearce 18 years ago
parent
commit
37d2a1c9fa
  1. 3
      git-gui.sh

3
git-gui.sh

@ -708,7 +708,8 @@ proc read_diff {fd} { @@ -708,7 +708,8 @@ proc read_diff {fd} {
#
if {[string match {@@@ *} $line]} {set is_3way_diff 1}

if {[string match {index *} $line]} {
if {[string match {index *} $line]
|| [regexp {^\* Unmerged path } $line]} {
set tags {}
} elseif {$is_3way_diff} {
set op [string range $line 0 1]

Loading…
Cancel
Save