Code

git-gui: Don't attempt to tag new file/deleted file headers in diffs.
authorShawn O. Pearce <spearce@spearce.org>
Mon, 22 Jan 2007 23:24:45 +0000 (18:24 -0500)
committerShawn O. Pearce <spearce@spearce.org>
Tue, 23 Jan 2007 06:48:49 +0000 (01:48 -0500)
We don't want to tag these new file/delete file lines, as they aren't
actually that interesting.  Its quite clear from the diff itself that
the file is a new file or is a deleted file (as the entire thing will
appear in the diff).

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
git-gui.sh

index 2350baa3a36d35f17167bc2f04061ccfbb222d98..d697d1ebe2a1a4b37a5d21e5afab8efde1df0d32 100755 (executable)
@@ -704,6 +704,8 @@ proc read_diff {fd} {
 
                if {[string match {index *} $line]
                        || [string match {mode *} $line]
+                       || [string match {new file *} $line]
+                       || [string match {deleted file *} $line]
                        || [regexp {^\* Unmerged path } $line]} {
                        set tags {}
                } elseif {$is_3way_diff} {