aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2006-05-23 13:49:00 -0600
committerJunio C Hamano <junkio@cox.net>2006-05-23 14:07:42 -0700
commit1f36bee67e604735bc48be7fc731a823e6c5807f (patch)
tree0fbb3b73b0499238d728f7672048127cdc2b5bd8
parent8b4525fb3c6d79bd3a64b8f441237a4095db4e22 (diff)
downloadgit-1f36bee67e604735bc48be7fc731a823e6c5807f.tar.gz
git-1f36bee67e604735bc48be7fc731a823e6c5807f.tar.xz
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>
-rw-r--r--mailinfo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mailinfo.c b/mailinfo.c
index 3fa950531..99989c25b 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();
}