merge: do not check argc to determine number of remote heads
commiteaa4e59c8545f61c6e61559df33dc4792e455d5a
authorJunio C Hamano <gitster@pobox.com>
Thu, 23 Apr 2015 20:56:34 +0000 (23 13:56 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 29 Apr 2015 20:17:52 +0000 (29 13:17 -0700)
tree502198d8fb5df6d56f347719b2c98dc68cfd99ed
parent1faac1cedca475a364c72b063c79da08caee0fe9
merge: do not check argc to determine number of remote heads

To reject merging multiple commits into an unborn branch, we check
argc, thinking that collect_parents() that reads the remaining
command line arguments from <argc, argv> will give us the same
number of commits as its input, i.e. argc.

Because what we really care about is the number of commits, let the
function run and then make sure it returns only one commit instead.

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