Code

cmd_merge(): Parse options before checking MERGE_HEAD
authorJohan Herland <johan@herland.net>
Tue, 9 Nov 2010 21:49:58 +0000 (22:49 +0100)
committerJunio C Hamano <gitster@pobox.com>
Wed, 17 Nov 2010 21:23:55 +0000 (13:23 -0800)
commit2a22c1b35d6110e72d86a2fac4b68dbad0905adb
treed4edcb49da9517972f8d11911acb80799e3f0b39
parent618cd75707580819f19a5f01dba406ac72219c78
cmd_merge(): Parse options before checking MERGE_HEAD

Reorder the initial part of builtin/merge.c:cmd_merge() so that command-line
options are parsed _before_ we load the index and check for MERGE_HEAD
(and exits if it exists). This does not change the behaviour of 'git merge',
but is needed in preparation for the implementation of 'git merge --abort'
(which requires MERGE_HEAD to be present).

This patch has been improved by the following contributions:
- Junio C Hamano: fixup minor style issues

Thanks-to: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/merge.c