summaryrefslogtreecommitdiff
path: root/t/t4004-diff-rename-symlink.sh
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-05-24 01:10:48 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-24 01:26:26 -0700
commit25d5ea410fd528c13e5f56f7836ee8a3b839b168 (patch)
tree06e98a3d7cfef4675801dacaffc8aad0d251398a /t/t4004-diff-rename-symlink.sh
parent1e3f6b6e64511491d86ac7ce447ee26cea362d12 (diff)
downloadgit-25d5ea410fd528c13e5f56f7836ee8a3b839b168.tar.gz
[PATCH] Redo rename/copy detection logic.
Earlier implementation had a major screw-up in the memory management area. Rename/copy logic sometimes borrowed a pointer to a structure without any provision for downstream to determine which pointer is shared and which is not. This resulted in the later clean-up code to sometimes double free such structure, resulting in a segfault. This made -M and -C useless. Another problem the earlier implementation had was that it reordered the patches, and forced the logic to differentiate renames and copies to depend on that particular order. This problem was fixed by teaching rename/copy detection logic not to do any reordering, and rename-copy differentiator not to depend on the order of the patches. The diffs will leave rename/copy detector in the same destination path order as the patch that was fed into it. Some test vectors have been reordered to accommodate this change. It also adds a sanity check logic to the human-readable diff-raw output to detect paths with embedded TAB and LF characters, which cannot be expressed with that format. This idea came up during a discussion with Chris Wedgwood. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 't/t4004-diff-rename-symlink.sh')
-rw-r--r--t/t4004-diff-rename-symlink.sh14
1 files changed, 7 insertions, 7 deletions
diff --git a/t/t4004-diff-rename-symlink.sh b/t/t4004-diff-rename-symlink.sh
index 31fdc50653..eb6dedd1ca 100644
--- a/t/t4004-diff-rename-symlink.sh
+++ b/t/t4004-diff-rename-symlink.sh
@@ -35,6 +35,13 @@ test_expect_success \
GIT_DIFF_OPTS=--unified=0 git-diff-cache -M -p $tree >current
cat >expected <<\EOF
+diff --git a/bozbar b/bozbar
+new file mode 120000
+--- /dev/null
++++ b/bozbar
+@@ -0,0 +1 @@
++xzzzy
+\ No newline at end of file
diff --git a/frotz b/nitfol
similarity index 100%
copy from frotz
@@ -50,13 +57,6 @@ deleted file mode 100644
@@ -1 +0,0 @@
-xyzzy
\ No newline at end of file
-diff --git a/bozbar b/bozbar
-new file mode 120000
---- /dev/null
-+++ b/bozbar
-@@ -0,0 +1 @@
-+xzzzy
-\ No newline at end of file
EOF
test_expect_success \