merge: add '--continue' option as a synonym for 'git commit'

Teach 'git merge' the --continue option which allows 'continuing' a
merge by completing it. The traditional way of completing a merge after
resolving conflicts is to use 'git commit'. Now with commands like 'git
rebase' and 'git cherry-pick' having a '--continue' option adding such
an option to 'git merge' presents a consistent UI.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Chris Packham
2016-12-14 21:37:55 +13:00
committed by Junio C Hamano
parent 454cb6bd52
commit 367ff69428
3 changed files with 38 additions and 0 deletions

View File

@ -154,6 +154,8 @@ test_expect_success 'test option parsing' '
test_must_fail git merge -s foobar c1 &&
test_must_fail git merge -s=foobar c1 &&
test_must_fail git merge -m &&
test_must_fail git merge --continue foobar &&
test_must_fail git merge --continue --quiet &&
test_must_fail git merge
'
@ -763,4 +765,11 @@ test_expect_success 'merge nothing into void' '
)
'
test_expect_success 'merge can be completed with --continue' '
git reset --hard c0 &&
git merge --no-ff --no-commit c1 &&
git merge --continue &&
verify_parents $c0 $c1
'
test_done