git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Aug 29, 2010, 21:46 UTC
Message-ID
<20100829214648.GE1890@burratino>
In-Reply-To
<c9d88eb8cbd5b025b0c0112be05d3c0fe993de25.1283103426.git.tfransosi@gmail.com>
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?
Show 8 quoted lines
> --- 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

Previous: Thiago FarinaNext: Thiago Farina
Message 2 of 10 in “builtin/merge_recursive.c: Add a usage string and make use of it.”
  1. builtin/merge_recursive.c: Add a usage string and make use of it.Thiago Farina, Aug 29, 2010
  2. Jonathan NiederAug 29, 2010
  3. builtin/merge_recursive.c: Add an usage string and make use of it.Thiago Farina, Aug 29, 2010
  4. Jonathan NiederAug 30, 2010
  5. builtin/merge_recursive.c: Add an usage string and make use of it.Thiago Farina, Aug 30, 2010
  6. Junio C HamanoAug 30, 2010
  7. Jonathan NiederAug 31, 2010
  8. Thiago FarinaSep 1, 2010
  9. Thiago FarinaAug 30, 2010
  10. Thiago FarinaAug 29, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.