diff options
author | Junio C Hamano <gitster@pobox.com> | 2009-02-15 01:44:15 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-02-15 01:44:15 -0800 |
commit | 160d2bc35382fb23beb99457e9111d15554bf223 (patch) | |
tree | ec3722d8676e73f69c0ab172cf44a06c7aac5fc6 /string-list.h | |
parent | 2a8644c7f163e4b76a36739ba936f8d5d91c3cf4 (diff) | |
parent | 7d48e9e6f77d336376c1a554eeff0590f77e1ee1 (diff) | |
download | git-160d2bc35382fb23beb99457e9111d15554bf223.tar.gz |
Merge branch 'ms/mailmap'
* ms/mailmap:
Move mailmap documentation into separate file
Change current mailmap usage to do matching on both name and email of author/committer.
Add map_user() and clear_mailmap() to mailmap
Add find_insert_index, insert_at_index and clear_func functions to string_list
Add mailmap.file as configurational option for mailmap location
Diffstat (limited to 'string-list.h')
-rw-r--r-- | string-list.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/string-list.h b/string-list.h index 4d6a7051fe..d32ba05202 100644 --- a/string-list.h +++ b/string-list.h @@ -15,9 +15,18 @@ struct string_list void print_string_list(const char *text, const struct string_list *p); void string_list_clear(struct string_list *list, int free_util); +/* Use this function to call a custom clear function on each util pointer */ +/* The string associated with the util pointer is passed as the second argument */ +typedef void (*string_list_clear_func_t)(void *p, const char *str); +void string_list_clear_func(struct string_list *list, string_list_clear_func_t clearfunc); + /* Use these functions only on sorted lists: */ int string_list_has_string(const struct string_list *list, const char *string); +int string_list_find_insert_index(const struct string_list *list, const char *string, + int negative_existing_index); struct string_list_item *string_list_insert(const char *string, struct string_list *list); +struct string_list_item *string_list_insert_at_index(int insert_at, + const char *string, struct string_list *list); struct string_list_item *string_list_lookup(const char *string, struct string_list *list); /* Use these functions only on unsorted lists: */ |