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.