From 2699542824fd7c69ff3d4597100b6d26b9a14166 Mon Sep 17 00:00:00 2001 From: Taylor Blau Date: Mon, 19 Sep 2022 21:55:40 -0400 Subject: Documentation/git-multi-pack-index.txt: fix typo Remove the extra space character between "tracked" and "by", which dates back to when this paragraph was originally written in cff9711616 (multi-pack-index: prepare for 'expire' subcommand, 2019-06-10). Signed-off-by: Taylor Blau Signed-off-by: Junio C Hamano --- Documentation/git-multi-pack-index.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Documentation') diff --git a/Documentation/git-multi-pack-index.txt b/Documentation/git-multi-pack-index.txt index a48c3d5ea6..b4a2378cd8 100644 --- a/Documentation/git-multi-pack-index.txt +++ b/Documentation/git-multi-pack-index.txt @@ -70,7 +70,7 @@ verify:: Verify the contents of the MIDX file. expire:: - Delete the pack-files that are tracked by the MIDX file, but + Delete the pack-files that are tracked by the MIDX file, but have no objects referenced by the MIDX. Rewrite the MIDX file afterward to remove all references to these pack-files. -- cgit v1.2.1 From 2a91b35fce7284ed480e92d1bd08c774e6a9a270 Mon Sep 17 00:00:00 2001 From: Taylor Blau Date: Mon, 19 Sep 2022 21:55:42 -0400 Subject: Documentation/git-multi-pack-index.txt: clarify expire behavior The `expire` sub-command of `git multi-pack-index` will never expire `.keep` packs, regardless of whether or not any of their objects were selected in the MIDX. This has always been the case since 19575c7c8e (multi-pack-index: implement 'expire' subcommand, 2019-06-10), which came after cff9711616 (multi-pack-index: prepare for 'expire' subcommand, 2019-06-10), when this documentation was originally written. Signed-off-by: Taylor Blau Signed-off-by: Junio C Hamano --- Documentation/git-multi-pack-index.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Documentation') diff --git a/Documentation/git-multi-pack-index.txt b/Documentation/git-multi-pack-index.txt index b4a2378cd8..11e6dc53e3 100644 --- a/Documentation/git-multi-pack-index.txt +++ b/Documentation/git-multi-pack-index.txt @@ -71,8 +71,9 @@ verify:: expire:: Delete the pack-files that are tracked by the MIDX file, but - have no objects referenced by the MIDX. Rewrite the MIDX file - afterward to remove all references to these pack-files. + have no objects referenced by the MIDX (with the exception of + `.keep` packs). Rewrite the MIDX file afterward to remove all + references to these pack-files. repack:: Create a new pack-file containing objects in small pack-files -- cgit v1.2.1 From 757d457907e3efa8eb911b772a690661cd432da5 Mon Sep 17 00:00:00 2001 From: Taylor Blau Date: Mon, 19 Sep 2022 21:55:45 -0400 Subject: midx.c: prevent `expire` from removing the cruft pack The `expire` sub-command unlinks any packs that are (a) contained in the MIDX, but (b) have no objects referenced by the MIDX. This sub-command ignores `.keep` packs, which remain on-disk even if they have no objects referenced by the MIDX. Cruft packs, however, aren't given the same treatment: if none of the objects contained in the cruft pack are selected from the cruft pack by the MIDX, then the cruft pack is eligible to be expired. This is less than desireable, since the cruft pack has important metadata about the individual object mtimes, which is useful to determine how quickly an object should age out of the repository when pruning. Ordinarily, we wouldn't expect the contents of a cruft pack to duplicated across non-cruft packs (and we'd expect to see the MIDX select all cruft objects from other sources even less often). But nonetheless, it is still possible to trick the `expire` sub-command into removing the `.mtimes` file in this circumstance. Teach the `expire` sub-command to ignore cruft packs in the same manner as it does `.keep` packs, in order to keep their metadata around, even when they are unreferenced by the MIDX. Signed-off-by: Taylor Blau Signed-off-by: Junio C Hamano --- Documentation/git-multi-pack-index.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Documentation') diff --git a/Documentation/git-multi-pack-index.txt b/Documentation/git-multi-pack-index.txt index 11e6dc53e3..3696506eb3 100644 --- a/Documentation/git-multi-pack-index.txt +++ b/Documentation/git-multi-pack-index.txt @@ -72,8 +72,8 @@ verify:: expire:: Delete the pack-files that are tracked by the MIDX file, but have no objects referenced by the MIDX (with the exception of - `.keep` packs). Rewrite the MIDX file afterward to remove all - references to these pack-files. + `.keep` packs and cruft packs). Rewrite the MIDX file afterward + to remove all references to these pack-files. repack:: Create a new pack-file containing objects in small pack-files -- cgit v1.2.1