Re: [PATCH v2 00/11] sha1_name: improvements

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

 



Felipe Contreras <felipe.contreras@xxxxxxxxx> writes:

> When merging this series to the @ shortcut one, there will be
> conflicts, this is how I propose fixing them:
>
>                 return len; /* syntax Ok, not enough switches */
> -       if (0 < len && len == namelen)
> +       if (len > 0 && len == namelen)
>                 return len; /* consumed all */
> -       else if (0 < len)
> ...
> ++      else if (len > 0)
>  +              return reinterpret(name, namelen, len, buf);
>
> - check "@" new-two
> - check "@@{u}" upstream-two
> ...
> ++check "@" ref refs/heads/new-branch
> ++check "@@{u}" ref refs/heads/upstream-branch

The resolution for the tests wrapper that acquired an extra
parameter matches what I did locally.  Thanks for a merge sanity
check.

I didn't see any conflicts on the sha1_name.c side, but I applied
the Yoda thing slightly differently to result in a slightly more
streamlined codeflow:

	if (!len) {
		return len;
	} else if (len > 0) {
		if (len == namelen)
                	return len;
		else
			return reinterpret(...);
	}

which I think shows the choices better.

Although I haven't looked at the largest one (10/11) carefully,
everything else looked quite straightforward and readable.

I am not very happy about how $<n> parameters are quoted in t1508,
but that suboptimal quoting were there before this series, and I'd
consider it outside of the scope for now.

Will queue.  Thanks.


--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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]