summaryrefslogtreecommitdiff
path: root/object.h
diff options
context:
space:
mode:
Diffstat (limited to 'object.h')
-rw-r--r--object.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/object.h b/object.h
index 33e5cc9943..df8abe96f7 100644
--- a/object.h
+++ b/object.h
@@ -38,6 +38,7 @@ struct object_array {
* http-push.c: 16-----19
* commit.c: 16-----19
* sha1_name.c: 20
+ * builtin/fsck.c: 0--3
*/
#define FLAG_BITS 27
@@ -46,7 +47,6 @@ struct object_array {
*/
struct object {
unsigned parsed : 1;
- unsigned used : 1;
unsigned type : TYPE_BITS;
unsigned flags : FLAG_BITS;
struct object_id oid;
@@ -116,6 +116,14 @@ int object_list_contains(struct object_list *list, struct object *obj);
void add_object_array(struct object *obj, const char *name, struct object_array *array);
void add_object_array_with_path(struct object *obj, const char *name, struct object_array *array, unsigned mode, const char *path);
+/*
+ * Returns NULL if the array is empty. Otherwise, returns the last object
+ * after removing its entry from the array. Other resources associated
+ * with that object are left in an unspecified state and should not be
+ * examined.
+ */
+struct object *object_array_pop(struct object_array *array);
+
typedef int (*object_array_each_func_t)(struct object_array_entry *, void *);
/*