aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBert Wesarg <bert.wesarg@googlemail.com>2010-12-09 21:47:54 +0100
committerPat Thoyts <patthoyts@users.sourceforge.net>2011-01-28 09:01:17 +0000
commit97b8ee167154b66ec59367d3cc6d6abf5a996440 (patch)
treec7e63fccccd5adb45de8ecfa677095947e9bab87
parentebd143ff999f40996832e9c221c41cb609578cd1 (diff)
downloadgit-97b8ee167154b66ec59367d3cc6d6abf5a996440.tar.gz
git-97b8ee167154b66ec59367d3cc6d6abf5a996440.tar.xz
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>
-rw-r--r--lib/diff.tcl8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/diff.tcl b/lib/diff.tcl
index 0b72924f7..aa300891a 100644
--- a/lib/diff.tcl
+++ b/lib/diff.tcl
@@ -406,12 +406,13 @@ proc read_diff {fd conflict_size cont_info} {
|| [string match {index *} $line]} {
continue
}
- }
- if {$line eq {deleted file mode 120000}} {
- set line "deleted symlink"
+ # -- Name it symlink, not 120000
+ # Note, that the original line is in $current_diff_header
+ regsub {^(deleted|new) file mode 120000} $line {\1 symlink} line
}
+
# -- Automatically detect if this is a 3 way diff.
#
if {[string match {@@@ *} $line]} {set is_3way_diff 1}
@@ -421,6 +422,7 @@ proc read_diff {fd conflict_size cont_info} {
|| [regexp {^(old|new) mode *} $line]
|| [string match {deleted file *} $line]
|| [string match {deleted symlink} $line]
+ || [string match {new symlink} $line]
|| [string match {Binary files * and * differ} $line]
|| $line eq {\ No newline at end of file}
|| [regexp {^\* Unmerged path } $line]} {