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

Re: [PATCH v17 14/14] tag.c: implement '--merged' and '--no-merged' options

From
John Keeping <john@keeping.me.uk>
Date
Sep 18, 2015, 08:42 UTC
Message-ID
<20150918084208.GJ17201@serenity.lan>
In-Reply-To
<vpqoah0kxtb.fsf@anie.imag.fr>
On Fri, Sep 18, 2015 at 09:10:08AM +0200, Matthieu Moy wrote:
Show 27 quoted lines
> Junio C Hamano <gitster@pobox.com> writes:
> 
> > John Keeping <john@keeping.me.uk> writes:
> >
> >>> +--[no-]merged [<commit>]::
> >>
> >> We prefer to write --[no-]* as:
> >>
> >> 	--option::
> >> 	--no-option::
> >>
> >> although this may be the first instance that we see this combination
> >> with an argument.
> >>
> >> I also found the "[<commit>]" syntax confusing and had to go and figure
> >> out what PARSE_OPT_LASTARG_DEFAULT does; I wonder if it's worth
> >> appending something like the following to the help for this option:
> >>
> >> 	The `commit` may be omitted if this is the final argument.
> >
> > "may be omitted" must be followed by a description of what happens
> > when omitted (i.e. "defaults to ...").
> 
> Then:
> 
> The `commit` may be omitted and defaults to HEAD if this is the final
> argument.

I find that slightly confusing, although that might just be me. It's slightly longer, but I would write:

	The `commit` may be omitted if this is the final argument, in
	which case it defaults to `HEAD`.

I also had a look at git-branch(1), which has similar `--merged` and `--no-merged` options and says:

	Only list branches whose tips are reachable from the specified
	commit (HEAD if not specified).  Implies `--list`.
The two options are listed separately in that case.
Previous: Matthieu MoyNext: Matthieu Moy
Message 42 of 56 in “port tag.c to use ref-filter APIs”
  1. 00/14 port tag.c to use ref-filter APIsKarthik Nayak, Sep 10, 2015
  2. 01/14 ref-filter: move `struct atom_value` to ref-filter.cKarthik Nayak, Sep 10, 2015
  3. 02/14 ref-filter: introduce ref_formatting_state and ref_formatting_stackKarthik Nayak, Sep 10, 2015
  4. 03/14 utf8: add function to align a string into given strbufKarthik Nayak, Sep 10, 2015
  5. 04/14 ref-filter: introduce handler function for each atomKarthik Nayak, Sep 10, 2015
  6. 05/14 ref-filter: introduce match_atom_name()Karthik Nayak, Sep 10, 2015
  7. Matthieu MoySep 10, 2015
  8. Junio C HamanoSep 10, 2015
  9. Matthieu MoySep 10, 2015
  10. Junio C HamanoSep 10, 2015
  11. Matthieu MoySep 10, 2015
  12. Junio C HamanoSep 10, 2015
  13. Karthik NayakSep 10, 2015
  14. Junio C HamanoSep 10, 2015
  15. Karthik NayakSep 10, 2015
  16. Junio C HamanoSep 10, 2015
  17. Karthik NayakSep 10, 2015
  18. 05/14 ref-filter: introduce match_atom_name()Karthik Nayak, Sep 11, 2015
  19. 06/14 ref-filter: implement an `align` atomKarthik Nayak, Sep 11, 2015
  20. 06/14 ref-filter: implement an `align` atomKarthik Nayak, Sep 10, 2015
  21. Matthieu MoySep 10, 2015
  22. Junio C HamanoSep 10, 2015
  23. 06/14 ref-filter: implement an `align` atomKarthik Nayak, Sep 11, 2015
  24. 07/14 ref-filter: add option to filter out tags, branches and remotesKarthik Nayak, Sep 10, 2015
  25. 08/14 ref-filter: add support for %(contents:lines=X)Karthik Nayak, Sep 10, 2015
  26. Junio C HamanoSep 10, 2015
  27. Karthik NayakSep 10, 2015
  28. 08/14 ref-filter: add support for %(contents:lines=X)Karthik Nayak, Sep 11, 2015
  29. 09/14 ref-filter: add support to sort by versionKarthik Nayak, Sep 10, 2015
  30. 10/14 ref-filter: add option to match literal patternKarthik Nayak, Sep 10, 2015
  31. 11/14 tag.c: use 'ref-filter' data structuresKarthik Nayak, Sep 10, 2015
  32. 12/14 tag.c: use 'ref-filter' APIsKarthik Nayak, Sep 10, 2015
  33. 12/14 tag.c: use 'ref-filter' APIsKarthik Nayak, Sep 11, 2015
  34. 13/14 tag.c: implement '--format' optionKarthik Nayak, Sep 10, 2015
  35. Junio C HamanoSep 10, 2015
  36. Karthik NayakSep 10, 2015
  37. 13/14 tag.c: implement '--format' optionKarthik Nayak, Sep 11, 2015
  38. 14/14 tag.c: implement '--merged' and '--no-merged' optionsKarthik Nayak, Sep 10, 2015
  39. John KeepingSep 17, 2015
  40. Junio C HamanoSep 17, 2015
  41. Matthieu MoySep 18, 2015
  42. John KeepingSep 18, 2015
  43. Matthieu MoySep 18, 2015
  44. Karthik NayakSep 18, 2015
  45. Matthieu MoySep 18, 2015
  46. Karthik NayakSep 18, 2015
  47. Matthieu MoySep 18, 2015
  48. Karthik NayakSep 18, 2015
  49. Matthieu MoySep 18, 2015
  50. Matthieu MoySep 10, 2015
  51. Karthik NayakSep 11, 2015
  52. Eric SunshineSep 11, 2015
  53. Junio C HamanoSep 11, 2015
  54. Karthik NayakSep 11, 2015
  55. Matthieu MoySep 12, 2015
  56. Karthik NayakSep 13, 2015

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.