{"thread":{"id":"22175","subject":"[PATCH] string-list: remove print_string_list, since it is not used anymore.","startedAt":"2010-01-11T21:29:49Z","lastAt":"2010-01-11T22:51:50Z","messageCount":6,"participants":["Thiago Farina","Johannes Schindelin","Junio C Hamano","Nicolas Pitre"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"131319","messageId":"1263245389-1558-1-git-send-email-tfransosi@gmail.com","threadId":"22175","inReplyTo":null,"subject":"[PATCH] string-list: remove print_string_list, since it is not used anymore.","fromName":"Thiago Farina","fromEmail":"tfransosi@gmail.com","sentAt":"2010-01-11T21:29:49Z","receivedAt":"2010-01-11T21:29:49Z","isPatch":true,"sender":{"key":"tfransosi@gmail.com","avatar":"https://avatars.githubusercontent.com/u/970071?v=4"},"body":"Signed-off-by: Thiago Farina <tfransosi@gmail.com>\n---\n string-list.c |   10 ----------\n string-list.h |    1 -\n 2 files changed, 0 insertions(+), 11 deletions(-)\n\ndiff --git a/string-list.c b/string-list.c\nindex 1ac536e..e929745 100644\n--- a/string-list.c\n+++ b/string-list.c\n@@ -138,16 +138,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 char *text, const struct string_list *p)\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(const char *string, struct string_list *list)\n {\n \tALLOC_GROW(list->items, list->nr + 1, list->alloc);\ndiff --git a/string-list.h b/string-list.h\nindex 6569cf6..8598257 100644\n--- a/string-list.h\n+++ b/string-list.h\n@@ -12,7 +12,6 @@ struct string_list\n \tunsigned int strdup_strings:1;\n };\n \n-void print_string_list(const char *text, const struct string_list *p);\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-- \n1.6.6.103.g699d2\n"},{"id":"131320","messageId":"alpine.DEB.1.00.1001112252040.4985@pacific.mpi-cbg.de","threadId":"22175","inReplyTo":"1263245389-1558-1-git-send-email-tfransosi@gmail.com","subject":"Re: [PATCH] string-list: remove print_string_list, since it is not used anymore.","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2010-01-11T21:52:27Z","receivedAt":"2010-01-11T21:52:27Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi.\n\nOn Mon, 11 Jan 2010, Thiago Farina wrote:\n\n> Signed-off-by: Thiago Farina <tfransosi@gmail.com>\n> ---\n\nIt was never used, except for debugging.  Does it hurt you really all that \nmuch?\n\nCiao,\nDscho\n"},{"id":"131322","messageId":"7v3a2ccmrg.fsf@alter.siamese.dyndns.org","threadId":"22175","inReplyTo":"alpine.DEB.1.00.1001112252040.4985@pacific.mpi-cbg.de","subject":"Re: [PATCH] string-list: remove print_string_list, since it is not used anymore.","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-01-11T22:14:27Z","receivedAt":"2010-01-11T22:14:27Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n> On Mon, 11 Jan 2010, Thiago Farina wrote:\n>\n>> Signed-off-by: Thiago Farina <tfransosi@gmail.com>\n>> ---\n>\n> It was never used, except for debugging.  Does it hurt you really all that \n> much?\n\nExactly my feeling.\n\nI think I discarded at least two other patches sent to me to remove this\n\"unused\" (but obviously meant for debugging) function in the past.  I\nguess we'll keep the function this time, too.\n"},{"id":"131323","messageId":"alpine.LFD.2.00.1001111722150.10143@xanadu.home","threadId":"22175","inReplyTo":"7v3a2ccmrg.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] string-list: remove print_string_list, since it is not used anymore.","fromName":"Nicolas Pitre","fromEmail":"nico@fluxnic.net","sentAt":"2010-01-11T22:23:21Z","receivedAt":"2010-01-11T22:23:21Z","isPatch":true,"sender":{"key":"nico@fluxnic.net","avatar":"https://avatars.githubusercontent.com/u/702790?v=4"},"body":"On Mon, 11 Jan 2010, Junio C Hamano wrote:\n\n> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n> \n> > On Mon, 11 Jan 2010, Thiago Farina wrote:\n> >\n> >> Signed-off-by: Thiago Farina <tfransosi@gmail.com>\n> >> ---\n> >\n> > It was never used, except for debugging.  Does it hurt you really all that \n> > much?\n> \n> Exactly my feeling.\n> \n> I think I discarded at least two other patches sent to me to remove this\n> \"unused\" (but obviously meant for debugging) function in the past.  I\n> guess we'll keep the function this time, too.\n\nIf so many people are so inclined to discard it, then maybe a little \ncomment could be added to explain its existance?\n\n\nNicolas\n"},{"id":"131324","messageId":"a4c8a6d01001111434j18b77b88j525b9acb47c7e100@mail.gmail.com","threadId":"22175","inReplyTo":"alpine.LFD.2.00.1001111722150.10143@xanadu.home","subject":"Re: [PATCH] string-list: remove print_string_list, since it is not used anymore.","fromName":"Thiago Farina","fromEmail":"tfransosi@gmail.com","sentAt":"2010-01-11T22:34:02Z","receivedAt":"2010-01-11T22:34:02Z","isPatch":true,"sender":{"key":"tfransosi@gmail.com","avatar":"https://avatars.githubusercontent.com/u/970071?v=4"},"body":"On Mon, Jan 11, 2010 at 8:23 PM, Nicolas Pitre <nico@fluxnic.net> wrote:\n> On Mon, 11 Jan 2010, Junio C Hamano wrote:\n>\n>> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n>>\n>> > On Mon, 11 Jan 2010, Thiago Farina wrote:\n>> >\n>> >> Signed-off-by: Thiago Farina <tfransosi@gmail.com>\n>> >> ---\n>> >\n>> > It was never used, except for debugging.  Does it hurt you really all that\n>> > much?\n>>\n>> Exactly my feeling.\n>>\n>> I think I discarded at least two other patches sent to me to remove this\n>> \"unused\" (but obviously meant for debugging) function in the past.  I\n>> guess we'll keep the function this time, too.\n>\n> If so many people are so inclined to discard it, then maybe a little\n> comment could be added to explain its existance?\n>\n\nI can add the comment if Junio is ok with it. Something like this:\n\"This functions is for debugging purpose only. Please, do NOT remove\nit.\"\n"},{"id":"131328","messageId":"7veilwb6gp.fsf@alter.siamese.dyndns.org","threadId":"22175","inReplyTo":"a4c8a6d01001111434j18b77b88j525b9acb47c7e100@mail.gmail.com","subject":"Re: [PATCH] string-list: remove print_string_list, since it is not used anymore.","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-01-11T22:51:50Z","receivedAt":"2010-01-11T22:51:50Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Thiago Farina <tfransosi@gmail.com> writes:\n\n> I can add the comment if Junio is ok with it. Something like this:\n> \"This functions is for debugging purpose only. Please, do NOT remove\n> it.\"\n\nSomething like this should suffice, as I think \"Please blah\" is just\nsuperfluous.\n\nI don't know if I like \"#ifdef DEBUG\" better, though.  It will still let\nyou say \"call print_string_list(...)\" in your debugger session, and people\nwouldn't muck with it even if there is no caller.\n\ndiff --git a/string-list.c b/string-list.c\nindex 1ac536e..793e619 100644\n--- a/string-list.c\n+++ b/string-list.c\n@@ -139,6 +139,7 @@ void string_list_clear_func(struct string_list *list, string_list_clear_func_t c\n }\n \n \n+#ifndef NDEBUG\n void print_string_list(const char *text, const struct string_list *p)\n {\n \tint i;\n@@ -147,6 +148,7 @@ void print_string_list(const char *text, const struct string_list *p)\n \tfor (i = 0; i < p->nr; i++)\n \t\tprintf(\"%s:%p\\n\", p->items[i].string, p->items[i].util);\n }\n+#endif\n \n struct string_list_item *string_list_append(const char *string, struct string_list *list)\n {\ndiff --git a/string-list.h b/string-list.h\nindex 6569cf6..8598257 100644\n--- a/string-list.h\n+++ b/string-list.h\n@@ -12,7 +12,6 @@ struct string_list\n \tunsigned int strdup_strings:1;\n };\n \n-void print_string_list(const char *text, const struct string_list *p);\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"}]}