On 29/11/2026 18:34, Junio C Hamano wrote:
> Erik Cervin-Edin <er…@cervined.in> writes:
>
>> Plain --fixup turns the editor off. Keep it on when using -c, so that
>> -c isn't silently treated like -C.
>
> I believe that this matches what Phillip suggested us doing, and I agree
> that would be a desirable behaviour.
>
> I however do not see this combination of --fixup and -c covered in new
> tests in t7500. Should we have one, or is it too trivial?
It would be nice, but I'm not sure it is essential, it seems a pretty obscure combination of options.
Thanks
Phillip
>
>> Helped-by: Junio C Hamano <gits…@pobox.com>
>
> I do not think I deserve this line as much as others would.
>
>> Signed-off-by: Erik Cervin-Edin <er…@cervined.in>
>
>> @@ -1396,7 +1401,8 @@ static int parse_and_validate_options(int argc, const char *argv[],
>> } else {
>> fixup_commit = fixup_message;
>> fixup_prefix = "fixup";
>> - use_editor = 0;
>> + if (!edit_message)
>> + use_editor = 0;
>> }
>> }
>
> Tricky but true. Naively if you do not have a message you would think
> you want to use editor to give the user a chance to supply one, but that
> is not how this part of the world works. It might deserve a short
> in-code comment why disabling of use_editor is done here and only when
> !edit_message to help future readers. I dunno.
>
> Thanks.