Code

commit,merge,tag: describe -m likewise
[git.git] / builtin / merge.c
index 3921cd304086cbc2edff0e1481f7c7395df8b00a..a682043fe5b91317bd7e998fbb95afc9b3ccf368 100644 (file)
@@ -194,8 +194,8 @@ static struct option builtin_merge_options[] = {
                "merge strategy to use", option_parse_strategy),
        OPT_CALLBACK('X', "strategy-option", &xopts, "option=value",
                "option for selected merge strategy", option_parse_x),
-       OPT_CALLBACK('m', "message", &merge_msg, "message",
-               "message to be used for the merge commit (if any)",
+       OPT_CALLBACK('m', "message", &merge_msg, "MESSAGE",
+               "merge commit message (for a non-fast-forward merge)",
                option_parse_message),
        OPT__VERBOSITY(&verbosity),
        OPT_BOOLEAN(0, "abort", &abort_current_merge,
@@ -922,6 +922,9 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
        const char *best_strategy = NULL, *wt_strategy = NULL;
        struct commit_list **remotes = &remoteheads;
 
+       if (argc == 2 && !strcmp(argv[1], "-h"))
+               usage_with_options(builtin_merge_usage, builtin_merge_options);
+
        /*
         * Check if we are _not_ on a detached HEAD, i.e. if there is a
         * current branch.