Subject: Re: [PATCH 1/2] refs.c: make ref_transaction_create a wrapper for ref_transaction_update

From: Jonathan Nieder <[email-masked]>
Date: Thu, 20 Nov 2014 10:03:15 -0800

Jeff King wrote:
> On Wed, Nov 19, 2014 at 01:40:23PM -0800, Stefan Beller wrote:

>> -	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