Thread (2 messages) flat view 2 messages, 2 authors, 2016-06-15

Re: [PATCH] Make git-mailinfo strip whitespace from the start of the mail file.

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:43:46

Possibly related (same subject, not in this thread)

Simon Sasburg [off-list ref] writes:
quoted hunk
@@ -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).
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help