Merge branch 'jc/am-mailinfo-direct'
authorJunio C Hamano <gitster@pobox.com>
Thu, 29 Oct 2015 20:59:23 +0000 (13:59 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 29 Oct 2015 20:59:23 +0000 (13:59 -0700)
"git am" used to spawn "git mailinfo" via run_command() API once
per each patch, but learned to make a direct call to mailinfo()
instead.

* jc/am-mailinfo-direct:
am: make direct call to mailinfo

1  2 
builtin/am.c
diff --cc builtin/am.c
index 4e396c832139aa3c4ae4e68e9d265b0107817aa9,1873307f9ea8460c83ac2b7b07c91709cf866beb..f1a25ab6ad881fc903a533595792b1a46b40ea91
@@@ -1341,9 -1345,8 +1345,8 @@@ 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"));
+       strbuf_addbuf(&msg, &mi.log_message);
 -      stripspace(&msg, 0);
 +      strbuf_stripspace(&msg, 0);
  
        if (state->signoff)
                am_signoff(&msg);