summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2012-02-28 13:26:01 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2012-02-28 13:26:01 -0800
commit4d50dbcda574a4618c84c26d0b8b9ef34980a1b7 (patch)
tree3ff4a3916560321a68ad99ba1a361ab3d8bf78eb /t
parentMerge branch 'jb/required-filter' (diff)
parentcherry-pick: No advice to commit if --no-commit (diff)
downloadtgif-4d50dbcda574a4618c84c26d0b8b9ef34980a1b7.tar.xz
Merge branch 'ph/cherry-pick-advice-refinement'
* ph/cherry-pick-advice-refinement: cherry-pick: No advice to commit if --no-commit
Diffstat (limited to 't')
-rwxr-xr-xt/t3507-cherry-pick-conflict.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/t/t3507-cherry-pick-conflict.sh b/t/t3507-cherry-pick-conflict.sh
index ee1659c178..0c81b3c427 100755
--- a/t/t3507-cherry-pick-conflict.sh
+++ b/t/t3507-cherry-pick-conflict.sh
@@ -59,6 +59,20 @@ test_expect_success 'advice from failed cherry-pick' "
test_i18ncmp expected actual
"
+test_expect_success 'advice from failed cherry-pick --no-commit' "
+ pristine_detach initial &&
+
+ picked=\$(git rev-parse --short picked) &&
+ cat <<-EOF >expected &&
+ error: could not apply \$picked... picked
+ hint: after resolving the conflicts, mark the corrected paths
+ hint: with 'git add <paths>' or 'git rm <paths>'
+ EOF
+ test_must_fail git cherry-pick --no-commit picked 2>actual &&
+
+ test_i18ncmp expected actual
+"
+
test_expect_success 'failed cherry-pick sets CHERRY_PICK_HEAD' '
pristine_detach initial &&
test_must_fail git cherry-pick picked &&