Skip to content

Commit 27ac51d

Browse files
KarthikNayakgitster
authored andcommitted
SQUASH - needs to describe the breakage and fix in v1
1 parent bc67b4a commit 27ac51d

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
@@ -920,6 +920,7 @@ static int prepare_transaction_update(struct write_transaction_table_arg **out,
920920
arg->updates_nr = 0;
921921
arg->updates_alloc = 0;
922922
arg->updates_expected = 0;
923+
arg->max_index = 0;
923924
}
924925

925926
arg->updates_expected++;
@@ -1502,10 +1503,9 @@ static int reftable_be_transaction_finish(struct ref_store *ref_store UNUSED,
15021503
struct reftable_transaction_data *tx_data = transaction->backend_data;
15031504
int ret = 0;
15041505

1505-
if (tx_data->args)
1506-
tx_data->args->max_index = transaction->max_index;
1507-
15081506
for (size_t i = 0; i < tx_data->args_nr; i++) {
1507+
tx_data->args[i].max_index = transaction->max_index;
1508+
15091509
ret = reftable_addition_add(tx_data->args[i].addition,
15101510
write_transaction_table, &tx_data->args[i]);
15111511
if (ret < 0)

0 commit comments

Comments
 (0)