refs: new transaction related ref-store api

The transaction struct now takes a ref store at creation and will
operate on that ref store alone.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Nguyễn Thái Ngọc Duy
2017-03-26 09:42:35 +07:00
committed by Junio C Hamano
parent 7d2df051d0
commit c0fe4e8ba3
3 changed files with 53 additions and 12 deletions

View File

@ -200,6 +200,7 @@ enum ref_transaction_state {
* as atomically as possible. This structure is opaque to callers.
*/
struct ref_transaction {
struct ref_store *ref_store;
struct ref_update **updates;
size_t alloc;
size_t nr;