On Tue, Apr 22, 2014 at 12:11 PM, Junio C Hamano wrote:
> Ronnie Sahlberg writes:
>
>> diff --git a/refs.c b/refs.c
>> index 138ab70..9daf89e 100644
>> --- a/refs.c
>> +++ b/refs.c
>> @@ -3414,12 +3414,12 @@ int ref_transaction_commit(struct ref_transaction
>> *transaction,
>>
Ronnie Sahlberg writes:
> @@ -3481,6 +3481,14 @@ cleanup:
> unlock_ref(updates[i]->lock);
> free(delnames);
> ref_transaction_free(transaction);
> + if (ret) {
> + const char *str = "Cannot commit transaction.";
> + switch (onerr) {
>
Ronnie Sahlberg writes:
> diff --git a/refs.c b/refs.c
> index 138ab70..9daf89e 100644
> --- a/refs.c
> +++ b/refs.c
> @@ -3414,12 +3414,12 @@ int ref_transaction_commit(struct ref_transaction
> *transaction,
> const char *msg, enum action_on_err onerr)
> ...
> + if
Update ref_transaction_commit to have a single exit path and process onerr
if an error occured during hte commit. This does mean that in case of an error
occuring for UPDATE_REFS_MSG_ON_ERR during the calls to update_ref_lock or
update_ref_write we will log errors from both those functions as well
4 matches
Mail list logo