@matheusbsbs / matheus-bagliano / commits / 76bf488e61
Fork 0

Do not misidentify "git merge foo HEAD" as an old-style invocation

This was misinterpreted as an ancient style "git merge <message> HEAD <commit> <commit>..." that merges one (or more) <commit> into the current branch and record the resulting commit with the given message. Then a later sanity check found that there is no <commit> specified and gave a usage message. Tested-by: Nanako Shiraishi <nanako3@lavabit.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Junio C Hamano committed Dec 2, 2009 at 09:59 UTC 76bf488e61b8a87191a1779b79820545e64ef275
1 file changed +1 -1
builtin-merge.c
+1 -1
@@ -792,7 +792,7 @@ static int suggest_conflicts(void)
792 static struct commit *is_old_style_invocation(int argc, const char **argv)
793 {
794 struct commit *second_token = NULL;
795 - if (argc > 1) {
795 + if (argc > 2) {
796 unsigned char second_sha1[20];
797
798 if (get_sha1(argv[1], second_sha1))