From 63af4a8446a624ad0d83d9b766c0eb5fbf83be12 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Fri, 16 Oct 2015 17:16:42 +0200 Subject: strbuf: make stripspace() part of strbuf This function is also used in other builtins than stripspace, so it makes sense to have it in a more generic place. Since it operates on an strbuf and the function is declared in strbuf.h, move it to strbuf.c and add the corresponding prefix to its name, just like other API functions in the strbuf_* family. Also switch all current users of stripspace() to the new function name and keep a temporary wrapper inline function for any topic branches still using stripspace(). Reviewed-by: Matthieu Moy Signed-off-by: Tobias Klauser Signed-off-by: Junio C Hamano --- builtin/tag.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'builtin/tag.c') diff --git a/builtin/tag.c b/builtin/tag.c index cba0e2266..f048cae0e 100644 --- a/builtin/tag.c +++ b/builtin/tag.c @@ -498,7 +498,7 @@ static void create_tag(const unsigned char *object, const char *tag, } if (opt->cleanup_mode != CLEANUP_NONE) - stripspace(buf, opt->cleanup_mode == CLEANUP_ALL); + strbuf_stripspace(buf, opt->cleanup_mode == CLEANUP_ALL); if (!opt->message_given && !buf->len) die(_("no tag message?")); -- cgit v1.2.1