Re: [PATCH v4 0/7] cherry-pick: add `--empty` for more robust redundant commit handling
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 25, 2024, 20:57 UTC
- Message-ID
- <xmqqa5mmhvx5.fsf@gitster.g>
- In-Reply-To
- <2ab7445f-08ee-4608-96ad-8171f9ce1b73@gmail.com>
phillip.wood123@gmail.com writes:
Show 18 quoted lines
>> + /* Check to see if this is an unborn branch */
>> + head_name = resolve_ref_unsafe("HEAD",
>> + RESOLVE_REF_READING | RESOLVE_REF_NO_RECURSE,
>> + &head_oid, NULL);
>> + if (!head_name
>> + || !starts_with(head_name, "refs/heads/")
>> + || !is_null_oid(&head_oid))
>> return error(_("could not resolve HEAD commit"));
>
> Normally we'd write this as
>
> if (!head_name ||
> starts_with(head_name, "refs/heads/") ||
> !is_null_oid(&head_oid))
> return error(...)
>
> breaking lines after an operator and indenting to the open bracket
> after the if.> The rest looks good. Junio was talking about merging > this to next in the latest "what's cooking" email so I'd double check > he hasn't done that yet before re-rolling.
I do not want to rush things---if we find that this is worth touching up (and obviously we do---otherwise we would not be having this conversation), then let's do have a quick v5 with minimal range-diff.
> Thank you for working on it, I've enjoyed reading your patches
Likewise. Thanks, both.