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

Re: Silly 'git am' UI issue

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
Mar 4, 2022, 18:50 UTC
Message-ID
<CAHk-=whaqdakNBwVZ-AZ0Ei2WLA+=3oqofhKfdQ618dWrYySfQ@mail.gmail.com>
In-Reply-To
<220304.86r17ifahr.gmgdl@evledraar.gmail.com>

On Thu, Mar 3, 2022 at 11:22 PM Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:

>
> A more general solution would be some continuation of this, i.e. we can
> use the "defval" in "struct option" as a pointer to a validation
> function for any arguments.

I wasn't familiar enough with the option parsing code to do this, but yes, I think your approach is nicer and makes it easier to add checking to the other passthrough cases

So Ack from me on that approach instead.

I do suspect that you'll notice when trying to code up a proper patch that it's probably complicated by the fact that the "validation" function wants a different argument (in this case a 'struct apply_state') than the "passthrough" function does (it wants that "struct strvec").

Again, I'm not familiar with the argument parsing code, it all post-dates my work, so what do I know..

                Linus
Previous: Ævar Arnfjörð Bjarmason
Message 7 of 7 in “Silly 'git am' UI issue”
  1. Linus TorvaldsMar 3, 2022
  2. Junio C HamanoMar 3, 2022
  3. Linus TorvaldsMar 4, 2022
  4. Junio C HamanoMar 4, 2022
  5. Ævar Arnfjörð BjarmasonMar 4, 2022
  6. Ævar Arnfjörð BjarmasonMar 4, 2022
  7. Linus TorvaldsMar 4, 2022

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.