Re: [PATCH 06/23] expire_reflog(): exit early if the reference has no reflog

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

 



Michael Haggerty wrote:

> --- a/builtin/reflog.c
> +++ b/builtin/reflog.c
> @@ -368,9 +368,11 @@ static int expire_reflog(const char *refname, const unsigned char *sha1, void *c
>  	lock = lock_any_ref_for_update(refname, sha1, 0, NULL);
>  	if (!lock)
>  		return error("cannot lock ref '%s'", refname);
> +	if (!reflog_exists(refname)) {
> +		unlock_ref(lock);
> +		return 0;
> +	}
>  	log_file = git_pathdup("logs/%s", refname);
> -	if (!reflog_exists(refname))
> -		goto finish;

Okay.

Reviewed-by: Jonathan Nieder <jrnieder@xxxxxxxxx>
--
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]