@matheusbsbs / matheus-bagliano / commits / 97b8ee1671
Fork 0

git-gui: name also new symlinks so

and rename them only in the diff header Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>

Bert Wesarg committed Dec 9, 2010 at 21:47 UTC 97b8ee167154b66ec59367d3cc6d6abf5a996440
1 file changed +5 -3
lib/diff.tcl
+5 -3
@@ -406,12 +406,13 @@ proc read_diff {fd conflict_size cont_info} {
406 || [string match {index *} $line]} {
407 continue
408 }
409 - }
409
411 - if {$line eq {deleted file mode 120000}} {
412 - set line "deleted symlink"
410 + # -- Name it symlink, not 120000
411 + # Note, that the original line is in $current_diff_header
412 + regsub {^(deleted|new) file mode 120000} $line {\1 symlink} line
413 }
414
415 +
416 # -- Automatically detect if this is a 3 way diff.
417 #
418 if {[string match {@@@ *} $line]} {set is_3way_diff 1}
@@ -421,6 +422,7 @@ proc read_diff {fd conflict_size cont_info} {
422 || [regexp {^(old|new) mode *} $line]
423 || [string match {deleted file *} $line]
424 || [string match {deleted symlink} $line]
425 + || [string match {new symlink} $line]
426 || [string match {Binary files * and * differ} $line]
427 || $line eq {\ No newline at end of file}
428 || [regexp {^\* Unmerged path } $line]} {