Re: [PATCH v20 43/48] refs.c: move the check for valid refname to lock_ref_sha1_basic
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Jul 15, 2014, 18:07 UTC
- Message-ID
- <20140715180709.GK12427@google.com>
- In-Reply-To
- <CAL=YDW=3aYhMNjCtT7BV=RDkRN2=Ac0uC_iEiQrO45i4C3zeDw@mail.gmail.com>
Ronnie Sahlberg wrote:
Show 14 quoted lines
> 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