From: Johannes Schindelin Date: Mon, 29 Jun 2015 05:12:38 GMT Subject: Re: [PATCH] fsck: it is OK for a tag and a commit to lack the body Message-ID: <32aa1979e75ba9bc6dc8a58fe32e9e55@www.dscho.org> In-Reply-To: Hi Junio, On 2015-06-28 20:18, Junio C Hamano wrote: > diff --git a/fsck.c b/fsck.c > index 88c92e8..3f264e7 100644 > --- a/fsck.c > +++ b/fsck.c > @@ -255,6 +255,15 @@ static int require_end_of_header(const void > *data, unsigned long size, > } > } > > + /* > + * We did not find double-LF that separates the header > + * and the body. Not having a body is not a crime but > + * we do want to see the terminating LF for the last header > + * line. > + */ > + if (size && buffer[size - 1] == '\n') > + return 0; > + > return error_func(obj, FSCK_ERROR, "unterminated header"); > } > Hmm. Maybe we should still warn when there is no empty line finishing the header explicitly, or at least make it FSCK_IGNORE by default so that maintainers who like a stricter check can upgrade the condition to an error? Otherwise: ACK. Ciao, Dscho