diff options
author | Ronnie Sahlberg <sahlberg@google.com> | 2014-06-20 18:42:45 +0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-07-14 22:54:40 +0400 |
commit | 1b07255c95cdf2f7dbe7989a734248f60799f506 (patch) | |
tree | c05e1687a763576505059600c7303d7711e5da92 /refs.h | |
parent | f1c9350ad784eca97184b73973fad353baa99a1d (diff) |
refs.c: allow passing NULL to ref_transaction_free
Allow ref_transaction_free(NULL) as a no-op. This makes ref_transaction_free
easier to use and more similar to plain 'free'.
In particular, it lets us rollback unconditionally as part of cleanup code
after setting 'transaction = NULL' if a transaction has been committed or
rolled back already.
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Ronnie Sahlberg <sahlberg@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Acked-by: Michael Haggerty <mhagger@alum.mit.edu>
Diffstat (limited to 'refs.h')
0 files changed, 0 insertions, 0 deletions