From: Junio C Hamano Date: Tue, 3 Nov 2015 23:32:26 +0000 (-0800) Subject: Merge branch 'tk/stripspace' into maint X-Git-Tag: v2.6.3~29 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/e23469f91a3417e7680cda2402c3c6c4a653cf54?hp=-c Merge branch 'tk/stripspace' into maint The internal stripspace() function has been moved to where it logically belongs to, i.e. strbuf API, and the command line parser of "git stripspace" has been updated to use the parse_options API. * tk/stripspace: stripspace: use parse-options for command-line parsing strbuf: make stripspace() part of strbuf --- e23469f91a3417e7680cda2402c3c6c4a653cf54 diff --combined builtin/am.c index 3bd4fd701b,fbe9152911..7b8e11eeaa --- a/builtin/am.c +++ b/builtin/am.c @@@ -1343,7 -1343,7 +1343,7 @@@ static int parse_mail(struct am_state * 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); @@@ -2208,17 -2208,6 +2208,17 @@@ enum resume_mode RESUME_ABORT }; +static int git_am_config(const char *k, const char *v, void *cb) +{ + int status; + + status = git_gpg_config(k, v, NULL); + if (status) + return status; + + return git_default_config(k, v, NULL); +} + int cmd_am(int argc, const char **argv, const char *prefix) { struct am_state state; @@@ -2319,7 -2308,7 +2319,7 @@@ OPT_END() }; - git_config(git_default_config, NULL); + git_config(git_am_config, NULL); am_state_init(&state, git_path("rebase-apply"));