Subject: Re: [PATCH v4 0/7] cherry-pick: add `--empty` for more robust redundant commit handling

From: Junio C Hamano <[email-masked]>
Date: Mon, 25 Mar 2024 13:57:10 -0700

[email-masked] writes:

>> +		/* 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.