Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTaylor Blau <me@ttaylorr.com>2022-05-21 02:17:54 +0300
committerJunio C Hamano <gitster@pobox.com>2022-05-27 01:48:26 +0300
commit2fb90409b8133803bae89773ac9a9db629443dc6 (patch)
tree176d4a1db494f1e2744fa970122ad17cdc98266e /reachable.h
parentb757353676d6ffe1ac275366fa8b5b42b5d9727d (diff)
reachable: add options to add_unseen_recent_objects_to_traversal
This function behaves very similarly to what we will need in pack-objects in order to implement cruft packs with expiration. But it is lacking a couple of things. Namely, it needs: - a mechanism to communicate the timestamps of individual recent objects to some external caller - and, in the case of packed objects, our future caller will also want to know the originating pack, as well as the offset within that pack at which the object can be found - finally, it needs a way to skip over packs which are marked as kept in-core. To address the first two, add a callback interface in this patch which reports the time of each recent object, as well as a (packed_git, off_t) pair for packed objects. Likewise, add a new option to the packed object iterators to skip over packs which are marked as kept in core. This option will become implicitly tested in a future patch. Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'reachable.h')
-rw-r--r--reachable.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/reachable.h b/reachable.h
index 5df932ad8f..b776761baa 100644
--- a/reachable.h
+++ b/reachable.h
@@ -1,11 +1,18 @@
#ifndef REACHEABLE_H
#define REACHEABLE_H
+#include "object.h"
+
struct progress;
struct rev_info;
+typedef void report_recent_object_fn(const struct object *, struct packed_git *,
+ off_t, time_t);
+
int add_unseen_recent_objects_to_traversal(struct rev_info *revs,
- timestamp_t timestamp);
+ timestamp_t timestamp,
+ report_recent_object_fn cb,
+ int ignore_in_core_kept_packs);
void mark_reachable_objects(struct rev_info *revs, int mark_reflog,
timestamp_t mark_recent, struct progress *);