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

Re: [PATCH v4] commit-tree: utilize parse-options api

From
Brandon Richardson <brandon1024.br@gmail.com>
Date
Mar 7, 2019, 01:52 UTC
Message-ID
<CAETBDP4MUN6pV2-xC=qsxnVynHuexOkU-nYbQ1OWeNGwBt3-Ng@mail.gmail.com>
In-Reply-To
<xmqqy35rpp13.fsf@gitster-ct.c.googlers.com>
On Wed, Mar 6, 2019 at 7:21 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 17 quoted lines
> >
> > +When mixing `-m` and `-F` options, the commit log message will be
> > +composed in the order in which the options are given.
>
> It may be just me, but this new paragraph made me think that we can
> give at most one -m and one -F option at the same time in any order,
> and multiple -m or -F options are not supported.  That, obviously,
> is not the impression we want to give to the readers.
>
> Even when you are not mixing -m and -F, but using -m more than once,
> the log message will be composed in the order in which options are
> given.  So probably the word "mixing" is the primary culprit of
> making the sentence easier to be misunderstood.
>
>         When using more than one `-m` or `-F` options, ...
>
> perhaps.
Good call, 'mixing' is not the right word here. Will fix.
> The change to this main function looks quite straight-forward.  I am
> kind of surprised that a very low hanging fruit like this had survived
> without getting hit by parseopt a lot earlier ;-)

I was surprised too, commit-tree hasn't seen much love over the years. There are certainly others that could benefit from parse-options.

Previous: Junio C HamanoNext: Duy Nguyen
Message 3 of 4 in “commit-tree: utilize parse-options api”
  1. commit-tree: utilize parse-options apiBrandon Richardson, Mar 5, 2019
  2. Junio C HamanoMar 6, 2019
  3. Brandon RichardsonMar 7, 2019
  4. Duy NguyenMar 7, 2019

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.