aboutsummaryrefslogtreecommitdiff
path: root/t/t3502-cherry-pick-merge.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t3502-cherry-pick-merge.sh')
-rwxr-xr-xt/t3502-cherry-pick-merge.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/t/t3502-cherry-pick-merge.sh b/t/t3502-cherry-pick-merge.sh
index e37547f41..b1602718f 100755
--- a/t/t3502-cherry-pick-merge.sh
+++ b/t/t3502-cherry-pick-merge.sh
@@ -31,6 +31,15 @@ test_expect_success setup '
'
+test_expect_success 'cherry-pick -m complains of bogus numbers' '
+ # expect 129 here to distinguish between cases where
+ # there was nothing to cherry-pick
+ test_expect_code 129 git cherry-pick -m &&
+ test_expect_code 129 git cherry-pick -m foo b &&
+ test_expect_code 129 git cherry-pick -m -1 b &&
+ test_expect_code 129 git cherry-pick -m 0 b
+'
+
test_expect_success 'cherry-pick a non-merge with -m should fail' '
git reset --hard &&