]> rtime.felk.cvut.cz Git - sojka/git-gui.git/commitdiff
git-gui: Handle file mode changes (644->755) in diff viewer
authorShawn O. Pearce <spearce@spearce.org>
Fri, 14 Dec 2007 06:51:22 +0000 (01:51 -0500)
committerShawn O. Pearce <spearce@spearce.org>
Fri, 14 Dec 2007 06:51:22 +0000 (01:51 -0500)
Johannes Sixt pointed out the diff headers "old mode ..." and
"new mode ..." were not being parsed properly by git-gui.  We
now include them in the diff viewer for a file.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
lib/diff.tcl

index 43565e412fa6c3c96487051c3997424e7d144b22..18aba3eae34297471aa905c9e157e1b5aedd369e 100644 (file)
@@ -220,6 +220,7 @@ proc read_diff {fd} {
 
                if {[string match {mode *} $line]
                        || [string match {new file *} $line]
+                       || [regexp {^(old|new) mode *} $line]
                        || [string match {deleted file *} $line]
                        || [string match {deleted symlink} $line]
                        || [string match {Binary files * and * differ} $line]