diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2015-10-16 17:16:42 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-10-16 09:45:15 -0700 |
commit | 63af4a8446a624ad0d83d9b766c0eb5fbf83be12 (patch) | |
tree | c9be56334b556212b1e5ef0bb82b9b590e31d4a1 /builtin/am.c | |
parent | 22f698cb188243b313e024d618283e0293e37140 (diff) | |
download | git-63af4a8446a624ad0d83d9b766c0eb5fbf83be12.tar.gz git-63af4a8446a624ad0d83d9b766c0eb5fbf83be12.tar.xz |
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 <Matthieu.Moy@imag.fr>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/am.c')
-rw-r--r-- | builtin/am.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/am.c b/builtin/am.c index 4f77e07b9..fbe915291 100644 --- a/builtin/am.c +++ b/builtin/am.c @@ -1343,7 +1343,7 @@ static int parse_mail(struct am_state *state, const char *mail) strbuf_addstr(&msg, "\n\n"); if (strbuf_read_file(&msg, am_path(state, "msg"), 0) < 0) die_errno(_("could not read '%s'"), am_path(state, "msg")); - stripspace(&msg, 0); + strbuf_stripspace(&msg, 0); if (state->signoff) am_signoff(&msg); |