From: Eric W. Biederman Date: Tue, 23 May 2006 19:49:00 +0000 (-0600) Subject: In handle_body only read a line if we don't already have one. X-Git-Tag: v1.4.0-rc1~49^2~3 X-Git-Url: https://git.octo.it/?a=commitdiff_plain;h=1f36bee67e604735bc48be7fc731a823e6c5807f;p=git.git In handle_body only read a line if we don't already have one. This prepares for detecting non-email patches that don't have mail headers. In which case we have already read the first line so handle_body should not ignore it. Signed-off-by: Eric W. Biederman Signed-off-by: Junio C Hamano --- diff --git a/mailinfo.c b/mailinfo.c index 3fa95053..99989c25 100644 --- a/mailinfo.c +++ b/mailinfo.c @@ -724,7 +724,7 @@ static void handle_body(void) { int seen = 0; - if (fgets(line, sizeof(line), stdin) != NULL) { + if (line[0] || fgets(line, sizeof(line), stdin) != NULL) { handle_commit_msg(&seen); handle_patch(); }