summaryrefslogtreecommitdiff
path: root/t/t4117-apply-reject.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-05-08 20:21:53 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-07-09 21:36:51 (GMT)
commitcfb6f9acc392561bb339763564e21b684e50ce83 (patch)
treedd788798f02e6f669a3e6c4c58f3a70daceb46e6 /t/t4117-apply-reject.sh
parentec15be02679ed5a98e4a96b23b99dd1b90196fae (diff)
downloadgit-cfb6f9acc392561bb339763564e21b684e50ce83.zip
git-cfb6f9acc392561bb339763564e21b684e50ce83.tar.gz
git-cfb6f9acc392561bb339763564e21b684e50ce83.tar.bz2
apply: accept -3/--3way command line option
Begin teaching the three-way merge fallback logic "git am -3" uses to the underlying "git apply". It only implements the command line parsing part, and does not do anything interesting yet, other than making sure that "--reject" and "--3way" are not given together, and making "--3way" imply "--index". Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4117-apply-reject.sh')
-rwxr-xr-xt/t4117-apply-reject.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/t/t4117-apply-reject.sh b/t/t4117-apply-reject.sh
index e9ccd16..8e15ecb 100755
--- a/t/t4117-apply-reject.sh
+++ b/t/t4117-apply-reject.sh
@@ -46,6 +46,14 @@ test_expect_success setup '
cat file1 >saved.file1
'
+test_expect_success 'apply --reject is incompatible with --3way' '
+ test_when_finished "cat saved.file1 >file1" &&
+ git diff >patch.0 &&
+ git checkout file1 &&
+ test_must_fail git apply --reject --3way patch.0 &&
+ git diff --exit-code
+'
+
test_expect_success 'apply without --reject should fail' '
if git apply patch.1