summaryrefslogtreecommitdiff
path: root/object-store.h
diff options
context:
space:
mode:
authorTaylor Blau <me@ttaylorr.com>2021-08-30 02:48:52 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-08-30 06:23:39 (GMT)
commita241878ac7b67b1894c14d3c3e33ed13f11ae253 (patch)
tree84c18dcc4b130740020122fb075e71890e928279 /object-store.h
parentc4203212e360b25a1c69467b5a8437d45a373cac (diff)
downloadgit-a241878ac7b67b1894c14d3c3e33ed13f11ae253.zip
git-a241878ac7b67b1894c14d3c3e33ed13f11ae253.tar.gz
git-a241878ac7b67b1894c14d3c3e33ed13f11ae253.tar.bz2
object-store.h: teach for_each_packed_object to ignore kept packs
The next patch will reimplement a function that wants to iterate over packed objects while ignoring packs which are marked as kept (either in-core or on-disk). Teach for_each_packed_object() to ignore all objects from those packs by adding a new flag for each of the "kept" states that a pack can be in. Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'object-store.h')
-rw-r--r--object-store.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/object-store.h b/object-store.h
index d24915c..b4dc666 100644
--- a/object-store.h
+++ b/object-store.h
@@ -455,6 +455,12 @@ enum for_each_object_flags {
* Visit objects within a pack in packfile order rather than .idx order
*/
FOR_EACH_OBJECT_PACK_ORDER = (1<<2),
+
+ /* Only iterate over packs that are not marked as kept in-core. */
+ FOR_EACH_OBJECT_SKIP_IN_CORE_KEPT_PACKS = (1<<3),
+
+ /* Only iterate over packs that do not have .keep files. */
+ FOR_EACH_OBJECT_SKIP_ON_DISK_KEPT_PACKS = (1<<4),
};
/*