summaryrefslogtreecommitdiff
path: root/t/t4103-apply-binary.sh
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-11-14 17:37:05 -0800
committerJunio C Hamano <junkio@cox.net>2005-11-16 16:20:40 -0800
commit011f4274bbb14e44035586f2ede695d584b8cfd2 (patch)
tree539f12ed014b1d0beaab44280436eb8d5ba7102f /t/t4103-apply-binary.sh
parent0c15cc921a54a2cd5f0758041fe9fdd715a493e8 (diff)
downloadgit-011f4274bbb14e44035586f2ede695d584b8cfd2.tar.gz
apply: allow-binary-replacement.
A new option, --allow-binary-replacement, is introduced. When you feed a diff that records full SHA1 name of pre- and post-image blob on its index line to git-apply with this option, the post-image blob replaces the path if what you have in the working tree matches the pre-image _and_ post-image blob is already available in the object directory. Later we _might_ want to enhance the diff output to also include the full binary data of the post-image, to make this more useful, but this is good enough for local rebasing application. Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 't/t4103-apply-binary.sh')
-rw-r--r--t/t4103-apply-binary.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/t/t4103-apply-binary.sh b/t/t4103-apply-binary.sh
index 948d5b5a7a..9057f6d04f 100644
--- a/t/t4103-apply-binary.sh
+++ b/t/t4103-apply-binary.sh
@@ -51,6 +51,14 @@ test_expect_failure 'check binary diff (copy) -- should fail.' \
'git-checkout master
git-apply --check C.diff'
+test_expect_failure 'check incomplete binary diff with replacement -- should fail.' \
+ 'git-checkout master
+ git-apply --check --allow-binary-replacement B.diff'
+
+test_expect_failure 'check incomplete binary diff with replacement (copy) -- should fail.' \
+ 'git-checkout master
+ git-apply --check --allow-binary-replacement C.diff'
+
# Now we start applying them.
test_expect_failure 'apply binary diff -- should fail.' \