From: Han-Wen Nienhuys Date: Mon, 12 Apr 2021 19:12:36 +0000 (+0000) Subject: reftable: document an alternate cleanup method on Windows X-Git-Tag: v2.32.0-rc0~71^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=61a7660516131de505cf9654079a7ab7d7be704a;p=thirdparty%2Fgit.git reftable: document an alternate cleanup method on Windows The new method uses the update_index counter, which isn't susceptible to clock inaccuracies. Signed-off-by: Han-Wen Nienhuys Signed-off-by: Junio C Hamano --- diff --git a/Documentation/technical/reftable.txt b/Documentation/technical/reftable.txt index 3ef169af27..d7c3b645cf 100644 --- a/Documentation/technical/reftable.txt +++ b/Documentation/technical/reftable.txt @@ -1011,8 +1011,13 @@ reftable stack, reload `tables.list`, and delete any tables no longer mentioned in `tables.list`. Irregular program exit may still leave about unused files. In this case, a -cleanup operation can read `tables.list`, note its modification timestamp, and -delete any unreferenced `*.ref` files that are older. +cleanup operation should proceed as follows: + +* take a lock `tables.list.lock` to prevent concurrent modifications +* refresh the reftable stack, by reading `tables.list` +* for each `*.ref` file, remove it if +** it is not mentioned in `tables.list`, and +** its max update_index is not beyond the max update_index of the stack Alternatives considered