On 09/29/2015 12:02 AM, David Turner wrote:
> This allows them to be used by other ref backends.
> 
> Signed-off-by: David Turner <dtur...@twopensource.com>
> ---
>  refs-be-files.c | 24 ------------------------
>  refs.h          | 24 ++++++++++++++++++++++++
>  2 files changed, 24 insertions(+), 24 deletions(-)
> 
> diff --git a/refs-be-files.c b/refs-be-files.c
> index 3bcfab3..2727943 100644
> --- a/refs-be-files.c
> +++ b/refs-be-files.c
> @@ -14,30 +14,6 @@ struct ref_lock {
>  };
>  
>  /*
> - * Flag passed to lock_ref_sha1_basic() telling it to tolerate broken
> - * refs (i.e., because the reference is about to be deleted anyway).
> - */
> -#define REF_DELETING 0x02
> [...]
> diff --git a/refs.h b/refs.h
> index 823983b..d8ae9af 100644
> --- a/refs.h
> +++ b/refs.h
> @@ -193,6 +193,30 @@ struct ref_transaction {
>  #define DO_FOR_EACH_PER_WORKTREE_ONLY 0x02
>  
>  /*
> + * Flag passed to lock_ref_sha1_basic() telling it to tolerate broken
> + * refs (i.e., because the reference is about to be deleted anyway).
> + */
> +#define REF_DELETING 0x02
> [...]

The fact that these constants might be used by multiple reference
backends is not a reason to put them in the ref API's public interface.
We don't want random code using these contants, right?

Maybe there should be a new file pair, refs-be-shared.{c,h}, for
"protected" constants and functions for the internal use of the
reference backends. In fact, maybe `struct ref_be` and the associated
typedefs could even be moved there.

Probably some of the functions that you have made public earlier in this
series could also go into the "protected" area.

Michael

-- 
Michael Haggerty
mhag...@alum.mit.edu

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to