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/merge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'builtin/merge.c') diff --git a/builtin/merge.c b/builtin/merge.c index a0edacab20..e6741f3380 100644 --- a/builtin/merge.c +++ b/builtin/merge.c @@ -806,7 +806,7 @@ static void prepare_to_commit(struct commit_list *remoteheads) abort_commit(remoteheads, NULL); } read_merge_msg(&msg); - stripspace(&msg, 0 < option_edit); + strbuf_stripspace(&msg, 0 < option_edit); if (!msg.len) abort_commit(remoteheads, _("Empty commit message.")); strbuf_release(&merge_msg); -- cgit v1.2.3