Skip to content

Commit

Permalink
In handle_body only read a line if we don't already have one.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Eric W. Biederman authored and Junio C Hamano committed May 23, 2006
1 parent 8b4525f commit 1f36bee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mailinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit 1f36bee

Please sign in to comment.