Skip to content

Commit 45020e4

Browse files
committed
Merge branch 'kn/reflog-migration-fix-fix' into seen
Fix bugs in an earlier attempt to fix "git refs migration". * kn/reflog-migration-fix-fix: SQUASH - needs to describe the breakage and fix in v1
2 parents 844a219 + 27ac51d commit 45020e4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

refs/reftable-backend.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1020,6 +1020,7 @@ static int prepare_transaction_update(struct write_transaction_table_arg **out,
10201020
arg->updates_nr = 0;
10211021
arg->updates_alloc = 0;
10221022
arg->updates_expected = 0;
1023+
arg->max_index = 0;
10231024
}
10241025

10251026
arg->updates_expected++;
@@ -1630,10 +1631,9 @@ static int reftable_be_transaction_finish(struct ref_store *ref_store UNUSED,
16301631
struct reftable_transaction_data *tx_data = transaction->backend_data;
16311632
int ret = 0;
16321633

1633-
if (tx_data->args)
1634-
tx_data->args->max_index = transaction->max_index;
1635-
16361634
for (size_t i = 0; i < tx_data->args_nr; i++) {
1635+
tx_data->args[i].max_index = transaction->max_index;
1636+
16371637
ret = reftable_addition_add(tx_data->args[i].addition,
16381638
write_transaction_table, &tx_data->args[i]);
16391639
if (ret < 0)

0 commit comments

Comments
 (0)