sha1_file: add for_each iterators for loose and packed objects
[gitweb.git] / object.h
index e028ced74c6c50459376d778c8bb9bae1d2808c3..2a755a23734ca8dc8188ce4507259e49bbfdee7b 100644 (file)
--- a/object.h
+++ b/object.h
@@ -133,6 +133,12 @@ void object_array_filter(struct object_array *array,
  */
 void object_array_remove_duplicates(struct object_array *array);
 
+/*
+ * Remove any objects from the array, freeing all used memory; afterwards
+ * the array is ready to store more objects with add_object_array().
+ */
+void object_array_clear(struct object_array *array);
+
 void clear_object_flags(unsigned flags);
 
 #endif /* OBJECT_H */