git-merge: a deprecation notice of the ancient command line syntax
[gitweb.git] / builtin-merge.c
index b6b84286b26a4317dfd5185ae83fd861c6f9fa7d..6bf841e78c403600427f00d3e3a545da6f43aa3c 100644 (file)
@@ -789,6 +789,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;
@@ -802,6 +807,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;
 }