path: root/fsck.c
diff options
authorJonathan Nieder <>2010-05-26 21:50:34 (GMT)
committerJunio C Hamano <>2010-05-28 22:08:27 (GMT)
commit0adc6a3d49a46436780b2dd636918c9840d82236 (patch)
treed4e8e57d71509d77bd624348b5b16153c35c29f4 /fsck.c
parentdaae19224a05be9efb9a39c2a2c1c9a60fe906f1 (diff)
fsck: fix bogus commit header check
daae1922 (fsck: check ident lines in commit objects, 2010-04-24) taught fsck to expect commit objects to have the form tree <object name> <parents> author <valid ident string> committer <valid ident string> log message The check is overly strict: for example, it errors out with the message “expected blank line” for perfectly valid commits with an "encoding ISO-8859-1" line. Later it might make sense to teach fsck about the rest of the header and warn about unrecognized header lines, but for simplicity, let’s accept arbitrary trailing lines for now. Reported-by: Tuncer Ayaz <> Signed-off-by: Jonathan Nieder <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'fsck.c')
1 files changed, 0 insertions, 2 deletions
diff --git a/fsck.c b/fsck.c
index ae9ae1a..3d05d4a 100644
--- a/fsck.c
+++ b/fsck.c
@@ -311,8 +311,6 @@ static int fsck_commit(struct commit *commit, fsck_error error_func)
err = fsck_ident(&buffer, &commit->object, error_func);
if (err)
return err;
- if (*buffer != '\n')
- return error_func(&commit->object, FSCK_ERROR, "invalid format - expected blank line");
if (!commit->tree)
return error_func(&commit->object, FSCK_ERROR, "could not load commit's tree %s", sha1_to_hex(tree_sha1));