Skip to content

Commit f8c4ab6

Browse files
stefanbellergitster
authored andcommitted
string_list: remove string_list_insert_at_index() from its API
There no longer is a caller to this function. Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 6322621 commit f8c4ab6

2 files changed

Lines changed: 1 addition & 9 deletions

File tree

string-list.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,7 @@ static int add_entry(int insert_at, struct string_list *list, const char *string
5959

6060
struct string_list_item *string_list_insert(struct string_list *list, const char *string)
6161
{
62-
return string_list_insert_at_index(list, -1, string);
63-
}
64-
65-
struct string_list_item *string_list_insert_at_index(struct string_list *list,
66-
int insert_at, const char *string)
67-
{
68-
int index = add_entry(insert_at, list, string);
62+
int index = add_entry(-1, list, string);
6963

7064
if (index < 0)
7165
index = -1 - index;

string-list.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,6 @@ int string_list_find_insert_index(const struct string_list *list, const char *st
6161
* Returns the string_list_item, the string is part of.
6262
*/
6363
struct string_list_item *string_list_insert(struct string_list *list, const char *string);
64-
struct string_list_item *string_list_insert_at_index(struct string_list *list,
65-
int insert_at, const char *string);
6664

6765
/*
6866
* Checks if the given string is part of a sorted list. If it is part of the list,

0 commit comments

Comments
 (0)