{"thread":{"id":"38374","subject":"[PATCH] string-list: remove print_string_list from string-list's API","startedAt":"2015-01-15T17:42:05Z","lastAt":"2015-01-15T18:00:13Z","messageCount":2,"participants":["Alexander Kuleshov"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"254757","messageId":"1421343725-3973-1-git-send-email-kuleshovmail@gmail.com","threadId":"38374","inReplyTo":null,"subject":"[PATCH] string-list: remove print_string_list from string-list's API","fromName":"Alexander Kuleshov","fromEmail":"kuleshovmail@gmail.com","sentAt":"2015-01-15T17:42:05Z","receivedAt":"2015-01-15T17:42:05Z","isPatch":true,"sender":{"key":"kuleshovmail@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2699235?v=4"},"body":"print_string_list routine has no callers anywhere.\n\nSigned-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>\n---\n Documentation/technical/api-string-list.txt |  6 ------\n string-list.c                               | 10 ----------\n string-list.h                               |  1 -\n 3 files changed, 17 deletions(-)\n\ndiff --git a/Documentation/technical/api-string-list.txt b/Documentation/technical/api-string-list.txt\nindex c08402b..99e12e9 100644\n--- a/Documentation/technical/api-string-list.txt\n+++ b/Documentation/technical/api-string-list.txt\n@@ -87,12 +87,6 @@ Functions\n \tcall free() on the util members of any items that have to be\n \tdeleted.  Preserve the order of the items that are retained.\n \n-`print_string_list`::\n-\n-\tDump a string_list to stdout, useful mainly for debugging purposes. It\n-\tcan take an optional header argument and it writes out the\n-\tstring-pointer pairs of the string_list, each one in its own line.\n-\n `string_list_clear`::\n \n \tFree a string_list. The `string` pointer of the items will be freed in\ndiff --git a/string-list.c b/string-list.c\nindex 2a32a3f..ba832da 100644\n--- a/string-list.c\n+++ b/string-list.c\n@@ -182,16 +182,6 @@ void string_list_clear_func(struct string_list *list, string_list_clear_func_t c\n \tlist->nr = list->alloc = 0;\n }\n \n-\n-void print_string_list(const struct string_list *p, const char *text)\n-{\n-\tint i;\n-\tif ( text )\n-\t\tprintf(\"%s\\n\", text);\n-\tfor (i = 0; i < p->nr; i++)\n-\t\tprintf(\"%s:%p\\n\", p->items[i].string, p->items[i].util);\n-}\n-\n struct string_list_item *string_list_append_nodup(struct string_list *list,\n \t\t\t\t\t\t  char *string)\n {\ndiff --git a/string-list.h b/string-list.h\nindex d3809a1..c417bd5 100644\n--- a/string-list.h\n+++ b/string-list.h\n@@ -20,7 +20,6 @@ struct string_list {\n \n void string_list_init(struct string_list *list, int strdup_strings);\n \n-void print_string_list(const struct string_list *p, const char *text);\n void string_list_clear(struct string_list *list, int free_util);\n \n /* Use this function to call a custom clear function on each util pointer */\n-- \n2.3.0.rc0.315.g0e14eda\n"},{"id":"254760","messageId":"CANCZXo7hn2wAqtfTNFBiKi_+K6O+vQQAh6pwAcRxjzuetL7+fg@mail.gmail.com","threadId":"38374","inReplyTo":"CAPc5daVSMRXiocYAVuWHMmDPmR661cNevaG3RgJC5zyda_Nnig@mail.gmail.com","subject":"Re: [PATCH] string-list: remove print_string_list from string-list's API","fromName":"Alexander Kuleshov","fromEmail":"kuleshovmail@gmail.com","sentAt":"2015-01-15T18:00:13Z","receivedAt":"2015-01-15T18:00:13Z","isPatch":true,"sender":{"key":"kuleshovmail@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2699235?v=4"},"body":"Maybe need to add comments for print_string_list, for preventing\npatches like this?\n\n2015-01-15 23:56 GMT+06:00 Junio C Hamano <gitster@pobox.com>:\n> On Thu, Jan 15, 2015 at 9:42 AM, Alexander Kuleshov\n> <kuleshovmail@gmail.com> wrote:\n>> print_string_list routine has no callers anywhere.\n>>\n>> Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>\n>\n> http://thread.gmane.org/gmane.comp.version-control.git/262439\n\n\n\n-- \n_________________________\n0xAX\n"}]}