git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] string_list: document string_list_(insert,lookup)
@ 2014-11-24 21:22 Stefan Beller
  2014-11-24 21:22 ` [PATCH 2/3] mailmap: use higher level string list functions Stefan Beller
  2014-11-24 21:22 ` [PATCH 3/3] string_list: Remove string_list_insert_at_index from its API Stefan Beller
  0 siblings, 2 replies; 5+ messages in thread
From: Stefan Beller @ 2014-11-24 21:22 UTC (permalink / raw)
  To: gitster, marius, julian, git; +Cc: Stefan Beller

Signed-off-by: Stefan Beller <sbeller@google.com>
---
 string-list.h | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/string-list.h b/string-list.h
index 494eb5d..40ffe0c 100644
--- a/string-list.h
+++ b/string-list.h
@@ -55,9 +55,19 @@ void string_list_remove_empty_items(struct string_list *list, int free_util);
 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);
+/*
+ * Inserts the given string into the sorted list.
+ * If the string already exists, the list is not altered.
+ * Returns the string_list_item, the string is part of.
+ */
 struct string_list_item *string_list_insert(struct string_list *list, const char *string);
 struct string_list_item *string_list_insert_at_index(struct string_list *list,
 						     int insert_at, const char *string);
+
+/*
+ * Checks if the given string is part of a sorted list. If it is part of the list,
+ * return the coresponding string_list_item, NULL otherwise.
+ */
 struct string_list_item *string_list_lookup(struct string_list *list, const char *string);
 
 /*
-- 
2.2.0.rc3

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-11-25  1:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-24 21:22 [PATCH 1/3] string_list: document string_list_(insert,lookup) Stefan Beller
2014-11-24 21:22 ` [PATCH 2/3] mailmap: use higher level string list functions Stefan Beller
2014-11-24 21:22 ` [PATCH 3/3] string_list: Remove string_list_insert_at_index from its API Stefan Beller
2014-11-25  0:25   ` Junio C Hamano
2014-11-25  1:16     ` Stefan Beller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).