Re: [PATCH 06/20] refs/files: remove "name exist?" check in lock_ref_oid_basic()

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

 



Ævar Arnfjörð Bjarmason  <avarab@xxxxxxxxx> writes:

> diff --git a/refs/files-backend.c b/refs/files-backend.c
> index 0af6ee44552..0dd21b2e205 100644
> --- a/refs/files-backend.c
> +++ b/refs/files-backend.c
> @@ -1013,16 +1013,6 @@ static struct ref_lock *lock_ref_oid_basic(struct files_ref_store *refs,
>  	CALLOC_ARRAY(lock, 1);
>  
>  	files_ref_path(refs, &ref_file, refname);
> -	if (!refs_resolve_ref_unsafe(&refs->base, refname,
> -				     RESOLVE_REF_NO_RECURSE,
> -				     &lock->old_oid, type)) {
> -		if (!refs_verify_refname_available(&refs->base, refname,
> -						   NULL, NULL, err))
> -			strbuf_addf(err, "unable to resolve reference '%s': %s",
> -				    refname, strerror(errno));
> -
> -		goto error_return;
> -	}
>  
>  	/*
>  	 * If the ref did not exist and we are creating it, make sure

This has the side effect of "type" not touched at all by this
function, which in turn triggers "type is used uninitialized?"
error in files_reflog_expire() that calls this function.





[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