Re: [PATCH] format-patch: trivial cleanup

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

 



Felipe Contreras <felipe.contreras@xxxxxxxxx> writes:

> Signed-off-by: Felipe Contreras <felipe.contreras@xxxxxxxxx>
> ---
>
> Actually, now that we are on it. After applying my latest patch series, this makes sense.

Yes, this is way easier to read.

>
>  builtin/log.c | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/builtin/log.c b/builtin/log.c
> index fab7998..7cf9277 100644
> --- a/builtin/log.c
> +++ b/builtin/log.c
> @@ -1058,12 +1058,10 @@ static char *find_branch_name(struct rev_info *rev)
>  		else
>  			return NULL;
>  	}
> -	if (0 <= positive) {
> -		ref = rev->cmdline.rev[positive].name;
> -		tip_sha1 = rev->cmdline.rev[positive].item->sha1;
> -	} else {
> +	if (positive < 0)
>  		return NULL;
> -	}
> +	ref = rev->cmdline.rev[positive].name;
> +	tip_sha1 = rev->cmdline.rev[positive].item->sha1;
>  	if (dwim_ref(ref, strlen(ref), branch_sha1, &full_ref) &&
>  	    !prefixcmp(full_ref, "refs/heads/") &&
>  	    !hashcmp(tip_sha1, branch_sha1))
--
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]