summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2009-01-27 01:08:02 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2009-01-27 01:08:02 -0800
commit90b23e5f21e101f14da60375e4bda265a677e209 (patch)
treeeffeccd13890741e6f0d5bafabd65be2c0d92551 /t
parentGIT 1.6.1.1 (diff)
parentdiff.c: output correct index lines for a split diff (diff)
downloadtgif-90b23e5f21e101f14da60375e4bda265a677e209.tar.xz
Merge branch 'jc/maint-1.6.0-split-diff-metainfo' into jc/maint-split-diff-metainfo
This is an evil merge, as a test added since 1.6.0 expects an incorrect behaviour the merged commit fixes. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-xt/t4030-diff-textconv.sh2
-rwxr-xr-xt/t4114-apply-typechange.sh18
2 files changed, 19 insertions, 1 deletions
diff --git a/t/t4030-diff-textconv.sh b/t/t4030-diff-textconv.sh
index 2f27a0ba9e..a3f0897a52 100755
--- a/t/t4030-diff-textconv.sh
+++ b/t/t4030-diff-textconv.sh
@@ -104,7 +104,7 @@ cat >expect.typechange <<'EOF'
-1
diff --git a/file b/file
new file mode 120000
-index ad8b3d2..67be421
+index 0000000..67be421
--- /dev/null
+++ b/file
@@ -0,0 +1 @@
diff --git a/t/t4114-apply-typechange.sh b/t/t4114-apply-typechange.sh
index 55334927ab..0f185caa44 100755
--- a/t/t4114-apply-typechange.sh
+++ b/t/t4114-apply-typechange.sh
@@ -25,6 +25,10 @@ test_expect_success 'setup repository and commits' '
git update-index foo &&
git commit -m "foo back to file" &&
git branch foo-back-to-file &&
+ printf "\0" > foo &&
+ git update-index foo &&
+ git commit -m "foo becomes binary" &&
+ git branch foo-becomes-binary &&
rm -f foo &&
git update-index --remove foo &&
mkdir foo &&
@@ -85,6 +89,20 @@ test_expect_success 'symlink becomes file' '
'
test_debug 'cat patch'
+test_expect_success 'binary file becomes symlink' '
+ git checkout -f foo-becomes-binary &&
+ git diff-tree -p --binary HEAD foo-symlinked-to-bar > patch &&
+ git apply --index < patch
+ '
+test_debug 'cat patch'
+
+test_expect_success 'symlink becomes binary file' '
+ git checkout -f foo-symlinked-to-bar &&
+ git diff-tree -p --binary HEAD foo-becomes-binary > patch &&
+ git apply --index < patch
+ '
+test_debug 'cat patch'
+
test_expect_success 'symlink becomes directory' '
git checkout -f foo-symlinked-to-bar &&