Re: [PATCH v2 06/11] refs API: pass the "lock OID" to reflog "prepare"

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

 



On Fri, Jul 16, 2021 at 04:13:02PM +0200, Ævar Arnfjörð Bjarmason wrote:

> diff --git a/builtin/reflog.c b/builtin/reflog.c
> index 09541d1c804..9f9e6bceb03 100644
> --- a/builtin/reflog.c
> +++ b/builtin/reflog.c
> @@ -351,7 +351,7 @@ static int is_head(const char *refname)
>  }
>  
>  static void reflog_expiry_prepare(const char *refname,
> -				  const struct object_id *oid,
> +				  struct object_id *locked_oid,
>  				  void *cb_data)
>  {

>  	struct expire_reflog_policy_cb *cb = cb_data;
> @@ -361,7 +361,7 @@ static void reflog_expiry_prepare(const char *refname,
>  		cb->unreachable_expire_kind = UE_HEAD;
>  	} else {
>  		cb->tip_commit = lookup_commit_reference_gently(the_repository,
> -								oid, 1);
> +								locked_oid, 1);
>  		if (!cb->tip_commit)
>  			cb->unreachable_expire_kind = UE_ALWAYS;
>  		else

This drops "const" from the parameter (also below). I guess this is part
of the preparation for making these functions do the locking. I'll read
on...

-Peff



[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