summaryrefslogtreecommitdiff
path: root/string-list.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-12-22 12:27:29 -0800
committerJunio C Hamano <gitster@pobox.com>2014-12-22 12:27:30 -0800
commit12b9f08953f4f558789f833b0fe438c25ce6d4b1 (patch)
treec5bcb65236b5753be77f9a3744dfc01de94b85eb /string-list.c
parent53c3692eaca38e9e30bc0b5d95d0a569ff6a62c2 (diff)
parentf8c4ab611ac5b714b6b4fd296c59512f97f87195 (diff)
downloadgit-12b9f08953f4f558789f833b0fe438c25ce6d4b1.tar.gz
Merge branch 'sb/string-list'
API simplification. * sb/string-list: string_list: remove string_list_insert_at_index() from its API mailmap: use higher level string list functions string_list: document string_list_(insert,lookup)
Diffstat (limited to 'string-list.c')
-rw-r--r--string-list.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/string-list.c b/string-list.c
index 2f69c32a8a..2a32a3f1f5 100644
--- a/string-list.c
+++ b/string-list.c
@@ -59,13 +59,7 @@ static int add_entry(int insert_at, struct string_list *list, const char *string
struct string_list_item *string_list_insert(struct string_list *list, const char *string)
{
- return string_list_insert_at_index(list, -1, string);
-}
-
-struct string_list_item *string_list_insert_at_index(struct string_list *list,
- int insert_at, const char *string)
-{
- int index = add_entry(insert_at, list, string);
+ int index = add_entry(-1, list, string);
if (index < 0)
index = -1 - index;