提交 6e21b508 编写于 作者: J Junio C Hamano

mailinfo: move global "line" into mailinfo() function

With the previous steps, it becomes clear that the mailinfo()
function is the only one that wants the "line" to be directly
touchable.  Move it to the function scope of this function.
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 fbbcafd0
......@@ -12,7 +12,6 @@ static FILE *cmitmsg, *patchfile, *fin, *fout;
static int keep_subject;
static int keep_non_patch_brackets_in_subject;
static const char *metainfo_charset;
static struct strbuf line = STRBUF_INIT;
static struct strbuf name = STRBUF_INIT;
static struct strbuf email = STRBUF_INIT;
static char *message_id;
......@@ -964,6 +963,8 @@ static void handle_info(void)
static int mailinfo(FILE *in, FILE *out, const char *msg, const char *patch)
{
int peek;
struct strbuf line = STRBUF_INIT;
fin = in;
fout = out;
......@@ -995,7 +996,7 @@ static int mailinfo(FILE *in, FILE *out, const char *msg, const char *patch)
fclose(patchfile);
handle_info();
strbuf_release(&line);
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册