Re: [PATCH v6 09/42] refs.c: change ref_transaction_create to do error checking and return status
> On Wed, May 14, 2014 at 5:04 PM, Jonathan Nieder <jrnieder@gmail.com> wrote:
Show 24 quoted lines
>> If it were ever triggered, the message
>>
>> error: some bad thing
>> fatal: failed transaction create for refs/heads/master
>>
>> looks overly verbose and unclear. Something like
>>
>> fatal: cannot create ref refs/heads/master: some bad thing
>
> I changed it to :
> die("cannot create ref '%s'", refname);
>
> But it would still mean you would have
> error: some bad thing
> fatal: cannot create 'refs/heads/master'
>
> To make it better we have to wait until the end of the second patch
> series, ref-transactions-next
> where we will have an err argument to _update/_create/_delete too and
> thus we can do this from update-ref.c :
>
> if (transaction_create_sha1(transaction, refname, new_sha1,
> update_flags, msg, &err))
> die("%s", err.buf);