diff options
author | Patrick Steinhardt <ps@pks.im> | 2024-11-20 08:51:30 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-11-20 23:59:14 +0100 |
commit | a0efef144686ca2c46caad98df72507ba2606ce5 (patch) | |
tree | 88e9912ac9831141af6569c1b7d1afe21a5facba /sequencer.c | |
parent | The eighth batch (diff) | |
download | git-a0efef144686ca2c46caad98df72507ba2606ce5.tar.xz git-a0efef144686ca2c46caad98df72507ba2606ce5.zip |
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>
Diffstat (limited to 'sequencer.c')
-rw-r--r-- | sequencer.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sequencer.c b/sequencer.c index 353d804999..287f4e5e87 100644 --- a/sequencer.c +++ b/sequencer.c @@ -662,7 +662,7 @@ static int fast_forward_to(struct repository *r, strbuf_addf(&sb, "%s: fast-forward", action_name(opts)); transaction = ref_store_transaction_begin(get_main_ref_store(the_repository), - &err); + 0, &err); if (!transaction || ref_transaction_update(transaction, "HEAD", to, unborn && !is_rebase_i(opts) ? @@ -1297,7 +1297,7 @@ int update_head_with_reflog(const struct commit *old_head, } transaction = ref_store_transaction_begin(get_main_ref_store(the_repository), - err); + 0, err); if (!transaction || ref_transaction_update(transaction, "HEAD", new_head, old_head ? &old_head->object.oid : null_oid(), @@ -3890,7 +3890,7 @@ static int do_label(struct repository *r, const char *name, int len) strbuf_addf(&ref_name, "refs/rewritten/%.*s", len, name); strbuf_addf(&msg, "rebase (label) '%.*s'", len, name); - transaction = ref_store_transaction_begin(refs, &err); + transaction = ref_store_transaction_begin(refs, 0, &err); if (!transaction) { error("%s", err.buf); ret = -1; |