summaryrefslogtreecommitdiff
path: root/builtin/prune-packed.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2018-08-14 18:21:18 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-08-14 19:29:57 (GMT)
commit0889aae1cd18c1804ba01c1a4229e516dfb9fe9b (patch)
tree23d7ffb8ef75b0952294270e041a8a1726016027 /builtin/prune-packed.c
parent79ed0a5e2627a0e1eab0448e6f32d781e80bfafa (diff)
downloadgit-0889aae1cd18c1804ba01c1a4229e516dfb9fe9b.zip
git-0889aae1cd18c1804ba01c1a4229e516dfb9fe9b.tar.gz
git-0889aae1cd18c1804ba01c1a4229e516dfb9fe9b.tar.bz2
for_each_*_object: move declarations to object-store.h
The for_each_loose_object() and for_each_packed_object() functions are meant to be part of a unified interface: they use the same set of for_each_object_flags, and it's not inconceivable that we might one day add a single for_each_object() wrapper around them. Let's put them together in a single file, so we can avoid awkwardness like saying "the flags for this function are over in cache.h". Moving the loose functions to packfile.h is silly. Moving the packed functions to cache.h works, but makes the "cache.h is a kitchen sink" problem worse. The best place is the recently-created object-store.h, since these are quite obviously related to object storage. The for_each_*_in_objdir() functions do not use the same flags, but they are logically part of the same interface as for_each_loose_object(), and share callback signatures. So we'll move those, as well, as they also make sense in object-store.h. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/prune-packed.c')
-rw-r--r--builtin/prune-packed.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/builtin/prune-packed.c b/builtin/prune-packed.c
index 4ff525e..a9e7b55 100644
--- a/builtin/prune-packed.c
+++ b/builtin/prune-packed.c
@@ -3,6 +3,7 @@
#include "progress.h"
#include "parse-options.h"
#include "packfile.h"
+#include "object-store.h"
static const char * const prune_packed_usage[] = {
N_("git prune-packed [-n | --dry-run] [-q | --quiet]"),