From mboxrd@z Thu Jan 1 00:00:00 1970 From: Johannes Schindelin Subject: Re: [PATCH 09/18] fsck: handle multiple authors in commits specially Date: Mon, 22 Dec 2014 22:53:49 +0100 (CET) Message-ID: References: <43faa41d4cc98d6c40a393ec590af73ec5c94246.1418055173.git.johannes.schindelin@gmx.de> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: git@vger.kernel.org To: Junio C Hamano X-From: git-owner@vger.kernel.org Mon Dec 22 22:54:02 2014 Return-path: Envelope-to: gcvg-git-2@plane.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Y3AvQ-0007to-O1 for gcvg-git-2@plane.gmane.org; Mon, 22 Dec 2014 22:54:01 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755282AbaLVVx4 (ORCPT ); Mon, 22 Dec 2014 16:53:56 -0500 Received: from mout.gmx.net ([212.227.15.15]:65337 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754900AbaLVVxz (ORCPT ); Mon, 22 Dec 2014 16:53:55 -0500 Received: from s15462909.onlinehome-server.info ([87.106.4.80]) by mail.gmx.com (mrgmx001) with ESMTPSA (Nemesis) id 0Me8di-1YFt1E1Gbm-00Ptna; Mon, 22 Dec 2014 22:53:50 +0100 X-X-Sender: schindelin@s15462909.onlinehome-server.info In-Reply-To: User-Agent: Alpine 1.00 (DEB 882 2007-12-20) X-Provags-ID: V03:K0:e/tndVvy/qiGg5Fji2sCx8a7/e3O63wxlp/wMn5byfZPb4VizgW VUV3XIbVD1Qt+N+WChFc2JyHdkhLfTQSi5+9qtPafaOo3NCiINOkCuTaBEwQG7UwUTYqXsW 4RRMYRXzFYu8oXwSAz7IsNPBrzbOuY7IZjtjBEZHFLU30muR2dkM5tOmDYQdUlr804wZzPR W9Oz7dPIjI15pXoc4T9Mw== X-UI-Out-Filterresults: notjunk:1; Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: Hi Junio, On Wed, 10 Dec 2014, Junio C Hamano wrote: > Johannes Schindelin writes: > > > This problem has been detected in the wild, and is the primary reason > > to introduce an option to demote certain fsck errors to warnings. Let's > > offer to ignore this particular problem specifically. > > ... > > + while (skip_prefix(buffer, "author ", &buffer)) { > > + err = report(options, &commit->object, FSCK_MSG_MULTIPLE_AUTHORS, "invalid format - multiple 'author' lines"); > > + if (err) > > + return err; > > If we have an option to demote this to a warning, wouldn't we want > to do the same fsck_ident() on that secondary author line? Good point! I changed the following to use fsck_ident() instead: > > + /* require_end_of_header() ensured that there is a newline */ > > + buffer = strchr(buffer, '\n') + 1; > > + } > > if (!skip_prefix(buffer, "committer ", &buffer)) > > return report(options, &commit->object, FSCK_MSG_MISSING_COMMITTER, "invalid format - expected 'committer' line"); > > err = fsck_ident(&buffer, &commit->object, options); Ciao, Dscho