Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
builtin/merge_recursive.c: Add an usage string and make use of it.
author
Thiago Farina
<tfransosi@gmail.com>
Mon, 30 Aug 2010 03:30:22 +0000
(
00:30
-0300)
committer
Junio C Hamano
<gitster@pobox.com>
Fri, 3 Sep 2010 16:37:10 +0000
(09:37 -0700)
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 <base>... -- <head> <remote> ...
Now the output is:
usage: git merge-recursive <base>... -- <head> <remote> ...
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 <base>... -- <head> <remote> ...
Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/merge-recursive.c
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
22da742
)
diff --git
a/builtin/merge-recursive.c
b/builtin/merge-recursive.c
index d8875d589240e0c78a9e241a7d2bdde1d10ab800..3d00adbfc79aa0d5e4e6b3367bc5b70f8df36857 100644
(file)
--- 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 <base>... -- <head> <remote> ...";
+
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 <base>... -- <head> <remote> ..."
, argv[0]);
+ usagef(
builtin_merge_recursive_usage
, argv[0]);
for (i = 1; i < argc; ++i) {
const char *arg = argv[i];