Skip to content

Commit 189a122

Browse files
peffgitster
authored andcommitted
drop add_object_array_with_mode
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 <[email protected]> Signed-off-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent d7702be commit 189a122

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

object.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -341,12 +341,7 @@ void add_object_array_with_path(struct object *obj, const char *name,
341341

342342
void add_object_array(struct object *obj, const char *name, struct object_array *array)
343343
{
344-
add_object_array_with_mode(obj, name, array, S_IFINVALID);
345-
}
346-
347-
void add_object_array_with_mode(struct object *obj, const char *name, struct object_array *array, unsigned mode)
348-
{
349-
add_object_array_with_path(obj, name, array, mode, NULL);
344+
add_object_array_with_path(obj, name, array, S_IFINVALID, NULL);
350345
}
351346

352347
/*

object.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ int object_list_contains(struct object_list *list, struct object *obj);
114114

115115
/* Object array handling .. */
116116
void add_object_array(struct object *obj, const char *name, struct object_array *array);
117-
void add_object_array_with_mode(struct object *obj, const char *name, struct object_array *array, unsigned mode);
118117
void add_object_array_with_path(struct object *obj, const char *name, struct object_array *array, unsigned mode, const char *path);
119118

120119
typedef int (*object_array_each_func_t)(struct object_array_entry *, void *);

0 commit comments

Comments
 (0)