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

Re: [PATCH v3 3/5] fmt-merge-msg: Update command line options to sync with config options

From
Ramkumar Ramachandra <artagnon@gmail.com>
Date
Aug 21, 2010, 05:51 UTC
Message-ID
<20100821055152.GH6211@kytes>
In-Reply-To
<20100821040203.GA2636@burratino>
Hi Jonathan,
Jonathan Nieder writes:
Show 11 quoted lines
> Ramkumar Ramachandra wrote:
> 
> > +++ b/builtin/fmt-merge-msg.c
> > @@ -7,11 +7,10 @@
> >  #include "string-list.h"
> >  
> >  static const char * const fmt_merge_msg_usage[] = {
> > -	"git fmt-merge-msg [-m <message>] [--log|--no-log] [--file <file>]",
> > +	"git fmt-merge-msg [-m <message>] [--log=[<n>]|--no-log] [--file <file>]",
> 
> [--log[=<n>]], no?
Right, my bad.
Show 15 quoted lines
> > @@ -328,10 +326,12 @@ int cmd_fmt_merge_msg(int argc, const char **argv, const char *prefix)
> >  	const char *inpath = NULL;
> >  	const char *message = NULL;
> >  	struct option options[] = {
> > -		OPT_BOOLEAN(0, "log",     &merge_summary, "populate log with the shortlog"),
> > -		{ OPTION_BOOLEAN, 0, "summary", &merge_summary, NULL,
> > +		{ OPTION_INTEGER, 0, "log", &log_limit, "n",
> > +		  "populate log with <n> entries from shortlog",
> > +		  PARSE_OPT_NOARG, NULL, 20 },
> > +		{ OPTION_INTEGER, 0, "summary", &log_limit, "n",
> >  		  "alias for --log (deprecated)",
> > -		  PARSE_OPT_NOARG | PARSE_OPT_HIDDEN },
> > +		  PARSE_OPT_NOARG | PARSE_OPT_HIDDEN, NULL, 20 },
> 
> OPTARG, I think.
OPTARG works. Sorry for the NOARG confusion.
-- Ram
Previous: Jonathan NiederNext: Ramkumar Ramachandra
Message 11 of 15 in “fmt-merge-msg improvements”
  1. 0/5 fmt-merge-msg improvementsRamkumar Ramachandra, Aug 20, 2010
  2. 1/5 parse-options: Allow PARSE_OPT_NOARG in integer argumentsRamkumar Ramachandra, Aug 20, 2010
  3. Junio C HamanoAug 20, 2010
  4. Ramkumar RamachandraAug 20, 2010
  5. Jonathan NiederAug 21, 2010
  6. 2/5 fmt-merge-msg: Make the number of log entries in commit message configurableRamkumar Ramachandra, Aug 20, 2010
  7. Jonathan NiederAug 21, 2010
  8. Ramkumar RamachandraAug 21, 2010
  9. 3/5 fmt-merge-msg: Update command line options to sync with config optionsRamkumar Ramachandra, Aug 20, 2010
  10. Jonathan NiederAug 21, 2010
  11. Ramkumar RamachandraAug 21, 2010
  12. 4/5 fmt-merge-msg: Remove deprecated --summary optionRamkumar Ramachandra, Aug 20, 2010
  13. Jonathan NiederAug 21, 2010
  14. Ramkumar RamachandraAug 21, 2010
  15. 5/5 fmt-merge-msg: Update fmt-merge-msg and merge-config documentationRamkumar Ramachandra, Aug 20, 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.