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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



phillip.wood123@xxxxxxxxx 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.





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux