Re: [PATCH 1/2] refs.c: make ref_transaction_create a wrapper for ref_transaction_update
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Nov 20, 2014, 18:03 UTC
- Message-ID
- <20141120180315.GA15945@google.com>
- In-Reply-To
- <20141120160000.GA31738@peff.net>
Jeff King wrote:
> On Wed, Nov 19, 2014 at 01:40:23PM -0800, Stefan Beller wrote:
Show 11 quoted lines
>> - if (check_refname_format(refname, REFNAME_ALLOW_ONELEVEL)) {
>> - strbuf_addf(err, "refusing to create ref with bad name %s",
>> - refname);
>> - return -1;
>> - }
>
> You claimed in the cover letter that only BUG messages were changed. But
> I think this third one is a real user-visible message.
>
> That being said, I think the sum total of the change to the message is
> s/create/update/, and it's probably fine.Yeah, it we want to get the 'create' back, we could handle it by checking if old_sha1 is null_sha1 in transaction_update (that would take of other callers, too, like 'git update-ref <ref> <commit> ""'). But I haven't convinced myself that's worth the complication --- in any event it could be a separate patch to avoid blocking this one.
Thanks, Jonathan