Re: [PATCH v4 04/16] refs: introduce function to batch refname availability checks
Patrick Steinhardt <ps@pks.im> writes:
[snip]
Show 23 quoted lines
> diff --git a/refs.h b/refs.h
> index a0cdd99250e..185aed5a461 100644
> --- a/refs.h
> +++ b/refs.h
> @@ -124,6 +124,18 @@ int refs_verify_refname_available(struct ref_store *refs,
> unsigned int initial_transaction,
> struct strbuf *err);
>
> +/*
> + * Same as `refs_verify_refname_available()`, but checking for a list of
> + * refnames instead of only a single item. This is more efficient in the case
> + * where one needs to check multiple refnames.
> + */
> +int refs_verify_refnames_available(struct ref_store *refs,
> + const struct string_list *refnames,
> + const struct string_list *extras,
> + const struct string_list *skip,
> + unsigned int initial_transaction,
> + struct strbuf *err);
> +
> int refs_ref_exists(struct ref_store *refs, const char *refname);
>
> int should_autocreate_reflog(enum log_refs_config log_all_ref_updates,
FYI: In my patch-series to add partial transaction support (based on top
of this series), I move this function to 'refs-internal.h', because I
also pass in the transaction to it.
The patch looks good!