summaryrefslogtreecommitdiff
path: root/builtin-mailinfo.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2007-11-09 21:13:46 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2007-11-09 21:13:46 -0800
commit0d9d89f61c58f72d96585a61defb0634873c38ac (patch)
treefcb314481bb669dcf1f33ba3934786c1dcc51b12 /builtin-mailinfo.c
parentMerge branch 'jk/terse-push' into aw/mirror-push (diff)
parentUpdate draft release notes for 1.5.4 (diff)
downloadtgif-0d9d89f61c58f72d96585a61defb0634873c38ac.tar.xz
Merge master into aw/mirror-push
Diffstat (limited to 'builtin-mailinfo.c')
-rw-r--r--builtin-mailinfo.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/builtin-mailinfo.c b/builtin-mailinfo.c
index fb12248f82..2600847974 100644
--- a/builtin-mailinfo.c
+++ b/builtin-mailinfo.c
@@ -915,6 +915,7 @@ static void handle_info(void)
static int mailinfo(FILE *in, FILE *out, int ks, const char *encoding,
const char *msg, const char *patch)
{
+ int peek;
keep_subject = ks;
metainfo_charset = encoding;
fin = in;
@@ -935,6 +936,11 @@ static int mailinfo(FILE *in, FILE *out, int ks, const char *encoding,
p_hdr_data = xcalloc(MAX_HDR_PARSED, sizeof(char *));
s_hdr_data = xcalloc(MAX_HDR_PARSED, sizeof(char *));
+ do {
+ peek = fgetc(in);
+ } while (isspace(peek));
+ ungetc(peek, in);
+
/* process the email header */
while (read_one_header_line(line, sizeof(line), fin))
check_header(line, sizeof(line), p_hdr_data, 1);