From: Thiago Farina Date: Mon, 30 Aug 2010 03:30:22 +0000 (-0300) Subject: builtin/merge_recursive.c: Add an usage string and make use of it. X-Git-Tag: v1.7.2.3~1 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=e78d01bf4e29ec92b4aa466ea0a49ae4be388ca9;p=git.git builtin/merge_recursive.c: Add an usage string and make use of it. This improves the usage output by adding builtin_merge_recursive_usage string that follows the same pattern used by the other builtin commands. The previous output for git merger-recursive was: usage: merge-recursive ... -- ... Now the output is: usage: git merge-recursive ... -- ... Since cmd_merge_recursive is used to handle four different commands we need the %s in the usage string, so the following example: $ git merge-subtree -h Will output: usage: git merge-subtree ... -- ... Signed-off-by: Thiago Farina Signed-off-by: Junio C Hamano --- diff --git a/builtin/merge-recursive.c b/builtin/merge-recursive.c index d8875d589..3d00adbfc 100644 --- a/builtin/merge-recursive.c +++ b/builtin/merge-recursive.c @@ -3,6 +3,9 @@ #include "tag.h" #include "merge-recursive.h" +static const char builtin_merge_recursive_usage[] = + "git %s ... -- ..."; + static const char *better_branch_name(const char *branch) { static char githead_env[8 + 40 + 1]; @@ -29,7 +32,7 @@ int cmd_merge_recursive(int argc, const char **argv, const char *prefix) o.subtree_shift = ""; if (argc < 4) - usagef("%s ... -- ...", argv[0]); + usagef(builtin_merge_recursive_usage, argv[0]); for (i = 1; i < argc; ++i) { const char *arg = argv[i];