Re: [PATCH v8 21/44] refs.c: ref_transaction_commit should not free the transaction
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- May 16, 2014, 00:20 UTC
- Message-ID
- <20140516002029.GB11011@google.com>
- In-Reply-To
- <1400174999-26786-22-git-send-email-sahlberg@google.com>
Ronnie Sahlberg wrote:
> Change ref_transaction_commit so that it does not free the transaction. > Instead require that a caller will end a transaction by either calling > ref_transaction_rollback or ref_transaction_free.
Can I always use ref_transaction_rollback instead of ref_transaction_free? It would be convenient if my cleanup code could always call _rollback instead of having to do something different for success and errors.
Another way to ask the question: what is it valid to do with a transaction after commiting?
Thanks, Jonathan