drop add_object_array_with_mode
authorJeff King <peff@peff.net>
Sun, 19 Oct 2014 02:03:19 +0000 (22:03 -0400)
committerJunio C Hamano <gitster@pobox.com>
Sun, 19 Oct 2014 22:28:30 +0000 (15:28 -0700)
This is a thin compatibility wrapper around
add_pending_object_with_path. But the only caller is
add_object_array, which is itself just a thin compatibility
wrapper. There are no external callers, so we can just
remove this middle wrapper.

Noticed-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
object.c
object.h
index df86bdd5a5e944f673fc4bddb6383476c9b0e8ae..23d6c9671904cfe273fc16de8a4d2db56b91c3b4 100644 (file)
--- a/object.c
+++ b/object.c
@@ -341,12 +341,7 @@ void add_object_array_with_path(struct object *obj, const char *name,
 
 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)
-{
-       add_object_array_with_path(obj, name, array, mode, NULL);
+       add_object_array_with_path(obj, name, array, S_IFINVALID, NULL);
 }
 
 /*
index e5178a516de7c36dc40bc2f994e2acced8ca37a4..6416247defa133c5c7ca43c69dfe09ae00ac03f7 100644 (file)
--- a/object.h
+++ b/object.h
@@ -114,7 +114,6 @@ int object_list_contains(struct object_list *list, struct object *obj);
 
 /* Object array handling .. */
 void add_object_array(struct object *obj, const char *name, struct object_array *array);
-void add_object_array_with_mode(struct object *obj, const char *name, struct object_array *array, unsigned mode);
 void add_object_array_with_path(struct object *obj, const char *name, struct object_array *array, unsigned mode, const char *path);
 
 typedef int (*object_array_each_func_t)(struct object_array_entry *, void *);