From 0adc6a3d49a46436780b2dd636918c9840d82236 Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Wed, 26 May 2010 16:50:34 -0500 Subject: fsck: fix bogus commit header check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit daae1922 (fsck: check ident lines in commit objects, 2010-04-24) taught fsck to expect commit objects to have the form tree author committer 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 --- fsck.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'fsck.c') diff --git a/fsck.c b/fsck.c index ae9ae1abee..3d05d4a794 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)); -- cgit v1.2.1