refs: allow passing flags when setting up a transaction
Allow passing flags when setting up a transaction such that the behaviour of the transaction itself can be altered. This functionality will be used in a subsequent patch. Adapt callers accordingly. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
facbe4f633
commit
a0efef1446
@@ -1634,7 +1634,7 @@ static int update_branch(struct branch *b)
|
||||
}
|
||||
}
|
||||
transaction = ref_store_transaction_begin(get_main_ref_store(the_repository),
|
||||
&err);
|
||||
0, &err);
|
||||
if (!transaction ||
|
||||
ref_transaction_update(transaction, b->name, &b->oid, &old_oid,
|
||||
NULL, NULL, 0, msg, &err) ||
|
||||
@@ -1669,7 +1669,7 @@ static void dump_tags(void)
|
||||
struct ref_transaction *transaction;
|
||||
|
||||
transaction = ref_store_transaction_begin(get_main_ref_store(the_repository),
|
||||
&err);
|
||||
0, &err);
|
||||
if (!transaction) {
|
||||
failure |= error("%s", err.buf);
|
||||
goto cleanup;
|
||||
|
||||
Reference in New Issue
Block a user