aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-03-12 20:01:28 -0700
committerJunio C Hamano <gitster@pobox.com>2009-03-12 20:01:28 -0700
commitde55390d36f30d5ef4be84eb9adba74f6903aa8e (patch)
tree979de479c424528e978590782ae75857fe7edc99 /t
parenteb006ccfca019b4e96210310d9f823d050127b22 (diff)
parentb67b9612e1a90ae093445abeaeff930e9f4cf936 (diff)
downloadgit-de55390d36f30d5ef4be84eb9adba74f6903aa8e.tar.gz
git-de55390d36f30d5ef4be84eb9adba74f6903aa8e.tar.xz
Merge branch 'jc/maint-1.6.0-split-diff-metainfo' into maint-1.6.0
* jc/maint-1.6.0-split-diff-metainfo: diff.c: output correct index lines for a split diff
Diffstat (limited to 't')
-rwxr-xr-xt/t4114-apply-typechange.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/t/t4114-apply-typechange.sh b/t/t4114-apply-typechange.sh
index 55334927a..0f185caa4 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 &&