Browse Source

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 <ebiederm@xmission.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
maint
Eric W. Biederman 19 years ago committed by Junio C Hamano
parent
commit
1f36bee67e
  1. 2
      mailinfo.c

2
mailinfo.c

@ -724,7 +724,7 @@ static void handle_body(void) @@ -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();
}

Loading…
Cancel
Save