Re: [PATCH v2 02/13] refs.c: use a single exit path from transaction commit and handle onerr

2014-04-22 Thread Junio C Hamano
Ronnie Sahlberg sahlb...@google.com 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) ...

Re: [PATCH v2 02/13] refs.c: use a single exit path from transaction commit and handle onerr

2014-04-22 Thread Junio C Hamano
Ronnie Sahlberg sahlb...@google.com 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

Re: [PATCH v2 02/13] refs.c: use a single exit path from transaction commit and handle onerr

2014-04-22 Thread Ronnie Sahlberg
On Tue, Apr 22, 2014 at 12:11 PM, Junio C Hamano gits...@pobox.com wrote: Ronnie Sahlberg sahlb...@google.com 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