Re: [PATCH v20 44/48] refs.c: call lock_ref_sha1_basic directly from commit

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

 



On 06/20/2014 04:43 PM, Ronnie Sahlberg wrote:
> Skip using the lock_any_ref_for_update wrapper and call lock_ref_sha1_basic
> directly from the commit function.

This commit is obviously hostage to whether commit 43/48 is kept.

> Reviewed-by: Jonathan Nieder <jrnieder@xxxxxxxxx>
> Signed-off-by: Ronnie Sahlberg <sahlberg@xxxxxxxxxx>
> ---
>  refs.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/refs.c b/refs.c
> index bccf8c3..f3fab37 100644
> --- a/refs.c
> +++ b/refs.c
> @@ -3598,12 +3598,12 @@ int ref_transaction_commit(struct ref_transaction *transaction,
>  	for (i = 0; i < n; i++) {
>  		struct ref_update *update = updates[i];
>  
> -		update->lock = lock_any_ref_for_update(update->refname,
> -						       (update->have_old ?
> -							update->old_sha1 :
> -							NULL),
> -						       update->flags,
> -						       &update->type);
> +		update->lock = lock_ref_sha1_basic(update->refname,
> +						   (update->have_old ?
> +						    update->old_sha1 :
> +						    NULL),
> +						   update->flags,
> +						   &update->type);
>  		if (!update->lock) {
>  			if (err)
>  				strbuf_addf(err, "Cannot lock the ref '%s'.",
> 

Michael

-- 
Michael Haggerty
mhagger@xxxxxxxxxxxx

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