From 76bf488e61b8a87191a1779b79820545e64ef275 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Wed, 2 Dec 2009 09:59:35 -0800 Subject: [PATCH] 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 --- builtin-merge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin-merge.c b/builtin-merge.c index e95c5dc717..e5cf795307 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)) -- GitLab