Code

git-tag(1): -v option is a subcommand; fix code block
[git.git] / object.c
index 7bd3fec55655584f9cf4aebc6a13de7b84a78af5..37d1363359eb54070ed4dc52b9e96d4ad9457db3 100644 (file)
--- a/object.c
+++ b/object.c
@@ -230,6 +230,11 @@ 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)
+{
+       add_object_array_with_mode(obj, name, array, S_IFINVALID);
+}
+
+void add_object_array_with_mode(struct object *obj, const char *name, struct object_array *array, unsigned mode)
 {
        unsigned nr = array->nr;
        unsigned alloc = array->alloc;
@@ -243,5 +248,6 @@ void add_object_array(struct object *obj, const char *name, struct object_array
        }
        objects[nr].item = obj;
        objects[nr].name = name;
+       objects[nr].mode = mode;
        array->nr = ++nr;
 }