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>
This commit is contained in:

committed by
Junio C Hamano

parent
37897bfc27
commit
4d67b4e474
@ -40,12 +40,12 @@ test_expect_success 'cherry-pick -m complains of bogus numbers' '
|
|||||||
test_expect_code 129 git cherry-pick -m 0 b
|
test_expect_code 129 git cherry-pick -m 0 b
|
||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success 'cherry-pick a non-merge with -m should fail' '
|
test_expect_success 'cherry-pick explicit first parent of a non-merge' '
|
||||||
|
|
||||||
git reset --hard &&
|
git reset --hard &&
|
||||||
git checkout a^0 &&
|
git checkout a^0 &&
|
||||||
test_expect_code 128 git cherry-pick -m 1 b &&
|
git cherry-pick -m 1 b &&
|
||||||
git diff --exit-code a --
|
git diff --exit-code c --
|
||||||
|
|
||||||
'
|
'
|
||||||
|
|
||||||
@ -84,12 +84,12 @@ test_expect_success 'cherry pick a merge relative to nonexistent parent should f
|
|||||||
|
|
||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success 'revert a non-merge with -m should fail' '
|
test_expect_success 'revert explicit first parent of a non-merge' '
|
||||||
|
|
||||||
git reset --hard &&
|
git reset --hard &&
|
||||||
git checkout c^0 &&
|
git checkout c^0 &&
|
||||||
test_must_fail git revert -m 1 b &&
|
git revert -m 1 b &&
|
||||||
git diff --exit-code c
|
git diff --exit-code a --
|
||||||
|
|
||||||
'
|
'
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user