cat-file: support "unordered" output for --batch-all-objects
[gitweb.git] / cache.h
diff --git a/cache.h b/cache.h
index 4187238ecf36e22d796ed030bfb72db975a0c164..6d14702df21fcc34b7395e16941064f4ee795342 100644 (file)
--- a/cache.h
+++ b/cache.h
@@ -1633,14 +1633,22 @@ enum for_each_object_flags {
 
        /* Only iterate over packs obtained from the promisor remote. */
        FOR_EACH_OBJECT_PROMISOR_ONLY = (1<<1),
+
+       /*
+        * Visit objects within a pack in packfile order rather than .idx order
+        */
+       FOR_EACH_OBJECT_PACK_ORDER = (1<<2),
 };
 
 /*
- * Iterate over loose objects in both the local
- * repository and any alternates repositories (unless the
- * LOCAL_ONLY flag is set).
+ * Iterate over all accessible loose objects without respect to
+ * reachability. By default, this includes both local and alternate objects.
+ * The order in which objects are visited is unspecified.
+ *
+ * Any flags specific to packs are ignored.
  */
-extern int for_each_loose_object(each_loose_object_fn, void *, unsigned flags);
+int for_each_loose_object(each_loose_object_fn, void *,
+                         enum for_each_object_flags flags);
 
 /*
  * Set this to 0 to prevent sha1_object_info_extended() from fetching missing