summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2007-01-21 14:23:51 -0500
committerShawn O. Pearce <spearce@spearce.org>2007-01-21 22:47:56 -0500
commit37d2a1c9fa2f94093cb6bd5e6b2aa6a38c95593e (patch)
treed9d046d074141283159d969be35a2851262a434a
parent884fd059f8c86dc815ea7fd769f7190e3f248536 (diff)
downloadgit-37d2a1c9fa2f94093cb6bd5e6b2aa6a38c95593e.tar.xz
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>
-rwxr-xr-xgit-gui.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/git-gui.sh b/git-gui.sh
index d26868beca..8e664f54e8 100755
--- a/git-gui.sh
+++ b/git-gui.sh
@@ -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]