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: Junio C Hamano <gitster@pobox.com>
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;
static int mailinfo(FILE *in, FILE *out, const char *msg, const char *patch)
{
int peek;
+ struct strbuf line = STRBUF_INIT;
+
fin = in;
fout = out;
fclose(patchfile);
handle_info();
-
+ strbuf_release(&line);
return 0;
}