Skip to content

Commit

Permalink
Merge branch 'jc/deprecate-old-syntax-from-merge'
Browse files Browse the repository at this point in the history
* jc/deprecate-old-syntax-from-merge:
  git-merge: a deprecation notice of the ancient command line syntax
  • Loading branch information
Junio C Hamano committed Dec 1, 2009
2 parents 4a27759 + b81e00a commit 36a83f3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions builtin-merge.c
Original file line number Diff line number Diff line change
Expand Up @@ -796,6 +796,11 @@ static int suggest_conflicts(void)
return 1;
}

static const char deprecation_warning[] =
"'git merge <msg> HEAD <commit>' is deprecated. Please update\n"
"your script to use 'git merge -m <msg> <commit>' instead.\n"
"In future versions of git, this syntax will be removed.";

static struct commit *is_old_style_invocation(int argc, const char **argv)
{
struct commit *second_token = NULL;
Expand All @@ -809,6 +814,7 @@ static struct commit *is_old_style_invocation(int argc, const char **argv)
die("'%s' is not a commit", argv[1]);
if (hashcmp(second_token->object.sha1, head))
return NULL;
warning(deprecation_warning);
}
return second_token;
}
Expand Down

0 comments on commit 36a83f3

Please sign in to comment.