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>
Shawn O. Pearce committed
Jan 21, 2007 at 14:23 UTC
37d2a1c9fa2f94093cb6bd5e6b2aa6a38c95593e
1 file changed
+2
-1
git-gui.sh
+2
-1
@@ -708,7 +708,8 @@ proc read_diff {fd} {
708
#
709
if {[string match {@@@ *} $line]} {set is_3way_diff 1}
710
711
- if {[string match {index *} $line]} {
711
+ if {[string match {index *} $line]
712
+ || [regexp {^\* Unmerged path } $line]} {
713
set tags {}
714
} elseif {$is_3way_diff} {
715
set op [string range $line 0 1]