t3502: validate '-m 1' argument is now accepted for non-merge commits

Signed-off-by: Sergey Organov <sorganov@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Sergey Organov committed Dec 14, 2018 at 07:53 UTC 4d67b4e4740895ddc5b8bd4f205e159999c1b974
1 file changed +6 -6
t/t3502-cherry-pick-merge.sh
+6 -6
@@ -40,12 +40,12 @@ test_expect_success 'cherry-pick -m complains of bogus numbers' '
40 test_expect_code 129 git cherry-pick -m 0 b
41 '
42
43 -test_expect_success 'cherry-pick a non-merge with -m should fail' '
43 +test_expect_success 'cherry-pick explicit first parent of a non-merge' '
44
45 git reset --hard &&
46 git checkout a^0 &&
47 - test_expect_code 128 git cherry-pick -m 1 b &&
48 - git diff --exit-code a --
47 + git cherry-pick -m 1 b &&
48 + git diff --exit-code c --
49
50 '
51
@@ -84,12 +84,12 @@ test_expect_success 'cherry pick a merge relative to nonexistent parent should f
84
85 '
86
87 -test_expect_success 'revert a non-merge with -m should fail' '
87 +test_expect_success 'revert explicit first parent of a non-merge' '
88
89 git reset --hard &&
90 git checkout c^0 &&
91 - test_must_fail git revert -m 1 b &&
92 - git diff --exit-code c
91 + git revert -m 1 b &&
92 + git diff --exit-code a --
93
94 '
95