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

Re: [PATCH 1/1] reset: parse rev as tree-ish in patch mode

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 25, 2019, 01:58 UTC
Message-ID
<xmqqblt0zpgk.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<CACwGqKgPYMEHhfOnAEuCA3sNiuV0Wk_JQwU+c=vF7Wkhf=V9iQ@mail.gmail.com>
Nika Layzell <nika@thelayzells.com> writes:
Show 14 quoted lines
>> Which means that perhaps a cleaner fix may be
>>
>> -       if (unborn) {
>> +       if (patch_mode) {
>> +               /* do not compute or check &oid we will not use */
>> +               ;
>> +       } else if (unborn) {
>>                 ...
>>
>> right?
>
> I tried to make this change, however it has unfortunate side-effects. The
> "git-add--interactive" script does produce an error if it is not of the
> expected type, but it exits with a successful "0" status.

Thanks for being diligent. I love it when I see contributors do not believe blindly what I suggest out of hunch and instead verify it themselves.

> Given that the add--interactive script is undergoing a C rewrite, I am
> inclined to continue validating the argument in reset.c to avoid changes to
> the perl script.
Thanks.  That is a very reasonable decision.
Previous: Nika LayzellNext: Nika Layzell via GitGitGadget
Message 5 of 8 in “reset: parse rev as tree-ish in patch mode”
  1. 0/1 reset: parse rev as tree-ish in patch modeNika Layzell via GitGitGadget, Nov 23, 2019
  2. 1/1 reset: parse rev as tree-ish in patch modeNika Layzell via GitGitGadget, Nov 23, 2019
  3. Junio C HamanoNov 24, 2019
  4. Nika LayzellNov 24, 2019
  5. Junio C HamanoNov 25, 2019
  6. 0/1 reset: parse rev as tree-ish in patch modeNika Layzell via GitGitGadget, Nov 24, 2019
  7. 1/1 reset: parse rev as tree-ish in patch modeNika Layzell via GitGitGadget, Nov 24, 2019
  8. Junio C HamanoNov 25, 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.