]> git.ipfire.org Git - thirdparty/git.git/blobdiff - cache.h
sha1_file: add for_each iterators for loose and packed objects
[thirdparty/git.git] / cache.h
diff --git a/cache.h b/cache.h
index bdfbbcf7904bf7604b73b4a29b7e7162980c20aa..51ee856acccb90b0652072fcf721b7b99b069f1c 100644 (file)
--- a/cache.h
+++ b/cache.h
@@ -1272,6 +1272,17 @@ int for_each_loose_file_in_objdir(const char *path,
                                  each_loose_subdir_fn subdir_cb,
                                  void *data);
 
+/*
+ * Iterate over loose and packed objects in both the local
+ * repository and any alternates repositories.
+ */
+typedef int each_packed_object_fn(const unsigned char *sha1,
+                                 struct packed_git *pack,
+                                 uint32_t pos,
+                                 void *data);
+extern int for_each_loose_object(each_loose_object_fn, void *);
+extern int for_each_packed_object(each_packed_object_fn, void *);
+
 struct object_info {
        /* Request */
        enum object_type *typep;