Skip to content

Commit eea0d11

Browse files
pks-tgitster
authored andcommitted
refs/reftable: reload correct stack when creating reflog iter
When creating a new reflog iterator, we first have to reload the stack that the iterator is being created. This is done so that any concurrent writes to the stack are reflected. But `reflog_iterator_for_stack()` always reloads the main stack, which is wrong. Fix this and reload the correct stack. Signed-off-by: Patrick Steinhardt <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 2efe795 commit eea0d11

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

refs/reftable-backend.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1682,7 +1682,7 @@ static struct reftable_reflog_iterator *reflog_iterator_for_stack(struct reftabl
16821682
if (ret)
16831683
goto done;
16841684

1685-
ret = reftable_stack_reload(refs->main_stack);
1685+
ret = reftable_stack_reload(stack);
16861686
if (ret < 0)
16871687
goto done;
16881688

0 commit comments

Comments
 (0)