From: Junio C Hamano Date: Fri, 02 Nov 2007 08:53:24 GMT Subject: Re: [PATCH] Make git-mailinfo strip whitespace from the start of the mail file. Message-ID: <7v8x5h58qj.fsf@gitster.siamese.dyndns.org> In-Reply-To: <1193951139-2312-1-git-send-email-Simon.Sasburg@gmail.com> Simon Sasburg writes: > @@ -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 (peek == ' ' || peek == '\r' || peek == '\n'); > + ungetc(peek, in); > + I wonder why this is not using isspace(peek).