git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] string-list: remove print_string_list from string-list's API
@ 2015-01-15 17:42 Alexander Kuleshov
       [not found] ` <CAPc5daVSMRXiocYAVuWHMmDPmR661cNevaG3RgJC5zyda_Nnig@mail.gmail.com>
  0 siblings, 1 reply; 2+ messages in thread
From: Alexander Kuleshov @ 2015-01-15 17:42 UTC (permalink / raw
  To: Junio C Hamano; +Cc: git, Alexander Kuleshov

print_string_list routine has no callers anywhere.

Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>
---
 Documentation/technical/api-string-list.txt |  6 ------
 string-list.c                               | 10 ----------
 string-list.h                               |  1 -
 3 files changed, 17 deletions(-)

diff --git a/Documentation/technical/api-string-list.txt b/Documentation/technical/api-string-list.txt
index c08402b..99e12e9 100644
--- a/Documentation/technical/api-string-list.txt
+++ b/Documentation/technical/api-string-list.txt
@@ -87,12 +87,6 @@ Functions
 	call free() on the util members of any items that have to be
 	deleted.  Preserve the order of the items that are retained.
 
-`print_string_list`::
-
-	Dump a string_list to stdout, useful mainly for debugging purposes. It
-	can take an optional header argument and it writes out the
-	string-pointer pairs of the string_list, each one in its own line.
-
 `string_list_clear`::
 
 	Free a string_list. The `string` pointer of the items will be freed in
diff --git a/string-list.c b/string-list.c
index 2a32a3f..ba832da 100644
--- a/string-list.c
+++ b/string-list.c
@@ -182,16 +182,6 @@ void string_list_clear_func(struct string_list *list, string_list_clear_func_t c
 	list->nr = list->alloc = 0;
 }
 
-
-void print_string_list(const struct string_list *p, const char *text)
-{
-	int i;
-	if ( text )
-		printf("%s\n", text);
-	for (i = 0; i < p->nr; i++)
-		printf("%s:%p\n", p->items[i].string, p->items[i].util);
-}
-
 struct string_list_item *string_list_append_nodup(struct string_list *list,
 						  char *string)
 {
diff --git a/string-list.h b/string-list.h
index d3809a1..c417bd5 100644
--- a/string-list.h
+++ b/string-list.h
@@ -20,7 +20,6 @@ struct string_list {
 
 void string_list_init(struct string_list *list, int strdup_strings);
 
-void print_string_list(const struct string_list *p, const char *text);
 void string_list_clear(struct string_list *list, int free_util);
 
 /* Use this function to call a custom clear function on each util pointer */
-- 
2.3.0.rc0.315.g0e14eda

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

* Re: [PATCH] string-list: remove print_string_list from string-list's API
       [not found] ` <CAPc5daVSMRXiocYAVuWHMmDPmR661cNevaG3RgJC5zyda_Nnig@mail.gmail.com>
@ 2015-01-15 18:00   ` Alexander Kuleshov
  0 siblings, 0 replies; 2+ messages in thread
From: Alexander Kuleshov @ 2015-01-15 18:00 UTC (permalink / raw
  To: Junio C Hamano, git@vger.kernel.org

Maybe need to add comments for print_string_list, for preventing
patches like this?

2015-01-15 23:56 GMT+06:00 Junio C Hamano <gitster@pobox.com>:
> On Thu, Jan 15, 2015 at 9:42 AM, Alexander Kuleshov
> <kuleshovmail@gmail.com> wrote:
>> print_string_list routine has no callers anywhere.
>>
>> Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>
>
> http://thread.gmane.org/gmane.comp.version-control.git/262439



-- 
_________________________
0xAX

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

end of thread, other threads:[~2015-01-15 18:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-15 17:42 [PATCH] string-list: remove print_string_list from string-list's API Alexander Kuleshov
     [not found] ` <CAPc5daVSMRXiocYAVuWHMmDPmR661cNevaG3RgJC5zyda_Nnig@mail.gmail.com>
2015-01-15 18:00   ` Alexander Kuleshov

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).