Re: [PATCH] check-ref-format: require a repository for --branch
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Oct 16, 2017, 23:00 UTC
- Message-ID
- <20171016230004.uhsyhvtltorjwu5q@aiede.mtv.corp.google.com>
- In-Reply-To
- <20171016224512.6fhtce5anmff577b@sigill.intra.peff.net>
Jeff King wrote:
> On Mon, Oct 16, 2017 at 07:45:46PM +0900, Junio C Hamano wrote:
Show 13 quoted lines
>> Here is to illustrate what I mean in a patch form. It resurrects
>> the gentle setup, and uses a purely textual format check when we are
>> outside the repository, while bypassing the @{magic} interpolation
>> codepath that requires us to be in a repository. When we are in a
>> repository, we operate the same way as before.
>
> I like the state this puts us in, but there's one catch: we're
> completely changing the meaning of "check-ref-format --branch", aren't
> we?
>
> It is going from "this is how you resolve @{-1}" to "this is how you
> check the validity of a potential branch name". Do we need to pick a
> different name, and/or have a deprecation period?Sorry to take so long on picking this up. I'll try to make an alternate patch today.
For what it's worth, I don't agree with this repurposing of "check-ref-format --branch" at all. The old command already existed. No one asked for the new command. At most, we could get rid of the old command after a deprecation period. I don't understand at all why it's worth the confusion of changing its meaning.
Thanks, Jonathan