Thread (7 messages) flat view 7 messages, 2 authors, 2016-06-15

Re: [PATCH] builtin/merge_recursive.c: Add a usage string and make use of it.

From: Jonathan Nieder <hidden>
Date: 2016-06-15 22:49:24

Hi Thiago,

Thiago Farina wrote:
This improves the usage output by adding builtin_merge_recursive_usage string
that follows the same pattern used by the other builtin commands.

Also it uses usage() function instead of the usagef() function.
FWIW cmd_merge_recursive is used to handle four different commands.

$ git grep -F -e cmd_merge_recursive
builtin.h:extern int cmd_merge_recursive(int argc, const char **argv, const char *prefix);
builtin/merge-recursive.c:int cmd_merge_recursive(int argc, const char **argv, const char *prefix)
git.c:          { "merge-recursive", cmd_merge_recursive, RUN_SETUP | NEED_WORK_TREE },
git.c:          { "merge-recursive-ours", cmd_merge_recursive, RUN_SETUP | NEED_WORK_TREE },
git.c:          { "merge-recursive-theirs", cmd_merge_recursive, RUN_SETUP | NEED_WORK_TREE },
git.c:          { "merge-subtree", cmd_merge_recursive, RUN_SETUP | NEED_WORK_TREE },

What will be the output from

 $ git merge-subtree -h

after this change?
quoted hunk ↗ jump to hunk
--- a/builtin/merge-recursive.c
+++ b/builtin/merge-recursive.c
@@ -37,19 +40,19 @@ int cmd_merge_recursive(int argc, const char **argv, const char *prefix)
 		if (!prefixcmp(arg, "--")) {
 			if (!arg[2])
 				break;
-			if (!strcmp(arg+2, "ours"))
+			if (!strcmp(arg + 2, "ours"))
Changes like these, while nice, would make more sense as a separate
patch.

Hope that helps,
Jonathan
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help