Skip to content

Commit

Permalink
Do not misidentify "git merge foo HEAD" as an old-style invocation
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Junio C Hamano committed Dec 2, 2009
1 parent af6fbf9 commit 76bf488
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion builtin-merge.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 76bf488

Please sign in to comment.