Re: [PATCH v6 02/42] refs.c: allow passing NULL to ref_transaction_free

2014-05-14 Thread Ronnie Sahlberg
Thanks. I changed the commit message. On Tue, May 13, 2014 at 3:44 PM, Jonathan Nieder jrnie...@gmail.com wrote: Ronnie Sahlberg wrote: Allow ref_transaction_free to be called with NULL and in extension allow ref_transaction_rollback to be called for a NULL transaction. In extension = as a

Re: [PATCH v6 02/42] refs.c: allow passing NULL to ref_transaction_free

2014-05-13 Thread Jonathan Nieder
Ronnie Sahlberg wrote: Allow ref_transaction_free to be called with NULL and in extension allow ref_transaction_rollback to be called for a NULL transaction. In extension = as a result? Makes sense. It lets someone do the usual struct ref_transaction *transaction; int ret =

Re: [PATCH v6 02/42] refs.c: allow passing NULL to ref_transaction_free

2014-05-13 Thread Ronnie Sahlberg
On Tue, May 13, 2014 at 3:44 PM, Jonathan Nieder jrnie...@gmail.com wrote: Ronnie Sahlberg wrote: Allow ref_transaction_free to be called with NULL and in extension allow ref_transaction_rollback to be called for a NULL transaction. In extension = as a result? Makes sense. It lets someone

[PATCH v6 02/42] refs.c: allow passing NULL to ref_transaction_free

2014-05-01 Thread Ronnie Sahlberg
Allow ref_transaction_free to be called with NULL and in extension allow ref_transaction_rollback to be called for a NULL transaction. This allows us to write code that will if ( (!transaction || ref_transaction_update(...)) || (ref_transaction_commit(...) !(transaction = NULL))