Merge branch 'tk/stripspace' into maint
authorJunio C Hamano <gitster@pobox.com>
Tue, 3 Nov 2015 23:32:26 +0000 (15:32 -0800)
committerJunio C Hamano <gitster@pobox.com>
Tue, 3 Nov 2015 23:32:26 +0000 (15:32 -0800)
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

1  2 
builtin/am.c
diff --combined builtin/am.c
index 3bd4fd701bdccab91f1343b371cf19e822c14db5,fbe9152911e32f4db4391a068051c6e1c1170cd1..7b8e11eeaa366c02aa0bf88017ed0af7b12162fb
@@@ -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;
                OPT_END()
        };
  
 -      git_config(git_default_config, NULL);
 +      git_config(git_am_config, NULL);
  
        am_state_init(&state, git_path("rebase-apply"));