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>
Eric W. Biederman committed
May 23, 2006 at 13:49 UTC
1f36bee67e604735bc48be7fc731a823e6c5807f
1 file changed
+1
-1
mailinfo.c
+1
-1
@@ -724,7 +724,7 @@ static void handle_body(void)
724
{
725
int seen = 0;
726
727
- if (fgets(line, sizeof(line), stdin) != NULL) {
727
+ if (line[0] || fgets(line, sizeof(line), stdin) != NULL) {
728
handle_commit_msg(&seen);
729
handle_patch();
730
}