Subject: Re: [PATCH v20 43/48] refs.c: move the check for valid refname to lock_ref_sha1_basic

From: Jonathan Nieder <[email-masked]>
Date: Tue, 15 Jul 2014 11:07:09 -0700

Ronnie Sahlberg wrote:

> What I suggest doing here is to create a new patch towards the end of
> the series that will :
> * change the resolve_ref_unsafe(... , int reading, ...) argument to be
> a bitmask of flags with
>     #define RESOLVE_REF_READING 0x01  (== current flag)
>     #define RESOLVE_REF_ALLOW_BAD_NAME 0x02  (== disable checking the
> refname format during resolve)
> * then provide the flag for RESOLVE_REF_ALLOW_BAD_NAME for the cases
> where we try to resolve a ref in builtin/branch.c where we try to
> delete a ref
>
> * then also pass the same flag to lock_ref_sha1_basic when we are
> deleting a ref from transaction_commit so we can disable the "check
> refname" check there too.

Yeah, that sounds lovely.

I wasn't able to reproduce a regression or convince myself there is
one so I think it's okay if that happens in a separate series.  But
doing it now would be fine, too.

Thanks,
Jonathan