In handle_body only read a line if we don't already have one.
authorEric W. Biederman <ebiederm@xmission.com>
Tue, 23 May 2006 19:49:00 +0000 (13:49 -0600)
committerJunio C Hamano <junkio@cox.net>
Tue, 23 May 2006 21:07:42 +0000 (14:07 -0700)
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 <ebiederm@xmission.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
mailinfo.c

index 3fa9505313cd509e81bba1de056681b8332b4bdc..99989c25b28a70043b866ab21cf6d88c45bc68ed 100644 (file)
@@ -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();
        }