diff options
author | Junio C Hamano <gitster@pobox.com> | 2009-12-01 12:47:01 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-12-01 12:47:01 -0800 |
commit | 36a83f375bc247a09f46de0445a138d5e6de8a4f (patch) | |
tree | e64aafa7ba59dedb651aa79b4b96483b855089af /builtin-merge.c | |
parent | 4a2775974ae47b69768b6bf5c5c75539409bb289 (diff) | |
parent | b81e00a965c62ca72a4b9db425ee173de147808d (diff) | |
download | git-36a83f375bc247a09f46de0445a138d5e6de8a4f.tar.gz |
Merge branch 'jc/deprecate-old-syntax-from-merge'
* jc/deprecate-old-syntax-from-merge:
git-merge: a deprecation notice of the ancient command line syntax
Diffstat (limited to 'builtin-merge.c')
-rw-r--r-- | builtin-merge.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/builtin-merge.c b/builtin-merge.c index fc7066e3c7..21045776b3 100644 --- a/builtin-merge.c +++ b/builtin-merge.c @@ -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; @@ -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; } |