Skip to content

Commit 76bf488

Browse files
committed
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent af6fbf9 commit 76bf488

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

builtin-merge.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -792,7 +792,7 @@ static int suggest_conflicts(void)
792792
static struct commit *is_old_style_invocation(int argc, const char **argv)
793793
{
794794
struct commit *second_token = NULL;
795-
if (argc > 1) {
795+
if (argc > 2) {
796796
unsigned char second_sha1[20];
797797

798798
if (get_sha1(argv[1], second_sha1))

0 commit comments

Comments
 (0)