summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2021-04-20 17:23:35 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-04-20 17:23:35 -0700
commit196cc525e2c8d4188c8553df8413573d8c3f0c42 (patch)
treebe68ac52f278dcd34069ff822f8dddf436e30c34
parentMerge branch 'jk/pack-objects-bitmap-progress-fix' (diff)
parentreftable: document an alternate cleanup method on Windows (diff)
downloadtgif-196cc525e2c8d4188c8553df8413573d8c3f0c42.tar.xz
Merge branch 'hn/reftable-tables-doc-update'
Doc updte. * hn/reftable-tables-doc-update: reftable: document an alternate cleanup method on Windows
-rw-r--r--Documentation/technical/reftable.txt9
1 files changed, 7 insertions, 2 deletions
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