Skip to content

Commit b4fcaa8

Browse files
pks-tgitster
authored andcommitted
refs/reftable: handle reloading stacks in the reftable backend
When accessing a stack we almost always have to reload the stack before reading data from it. This is mostly because Git does not have a notification mechanism for when underlying data has been changed, and thus we are forced to opportunistically reload the stack every single time to account for any changes that may have happened concurrently. Handle the reload internally in `backend_for()`. For one this forces callsites to think about whether or not they need to reload the stack. But second this makes the logic to access stacks more self-contained by letting the `struct reftable_backend` manage themselves. Signed-off-by: Patrick Steinhardt <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent cbbf7d5 commit b4fcaa8

File tree

1 file changed

+93
-57
lines changed

1 file changed

+93
-57
lines changed

0 commit comments

Comments
 (0)