merge-base: use OPT_CMDMODE and clarify the command line parsing
commit16e57aec7f672fabe38fa0e4d39252eb9c7a1563
authorJunio C Hamano <gitster@pobox.com>
Wed, 23 Oct 2013 23:10:25 +0000 (23 16:10 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 23 Oct 2013 23:25:20 +0000 (23 16:25 -0700)
treec1663dcb15f7ebd0ee73782b00afcb68562e2c76
parentd5d09d475440c24016ec52a0bcc8477d9a7b5c71
merge-base: use OPT_CMDMODE and clarify the command line parsing

The --octopus, --independent and --is-ancestor are mutually
exclusive command modes (in addition to not giving any of these
options), so represent them as such using the recent OPT_CMDMODE
facility available since 11588263 (parse-options: add OPT_CMDMODE(),
2013-07-30), which is in v1.8.4-82-g366b80b.  --all is compatible
only with plain vanilla mode and --octopus mode, and the minimum
number of arguments the command takes depends on the command modes,
so these are now separately checked in each command mode.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/merge-base.c