From: Junio C Hamano Date: Wed, 2 Dec 2009 17:59:35 +0000 (-0800) Subject: Do not misidentify "git merge foo HEAD" as an old-style invocation X-Git-Tag: v1.6.6-rc1~2^2~2 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=76bf488e61b8a87191a1779b79820545e64ef275;p=git.git Do not misidentify "git merge foo HEAD" as an old-style invocation This was misinterpreted as an ancient style "git merge HEAD ..." that merges one (or more) into the current branch and record the resulting commit with the given message. Then a later sanity check found that there is no specified and gave a usage message. Tested-by: Nanako Shiraishi Signed-off-by: Junio C Hamano --- diff --git a/builtin-merge.c b/builtin-merge.c index e95c5dc71..e5cf79530 100644 --- a/builtin-merge.c +++ b/builtin-merge.c @@ -792,7 +792,7 @@ static int suggest_conflicts(void) static struct commit *is_old_style_invocation(int argc, const char **argv) { struct commit *second_token = NULL; - if (argc > 1) { + if (argc > 2) { unsigned char second_sha1[20]; if (get_sha1(argv[1], second_sha1))