From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.81]) by mx.groups.io with SMTP id smtpd.web12.5621.1587735011471277433 for ; Fri, 24 Apr 2020 06:30:11 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ZdOLunjF; spf=pass (domain: redhat.com, ip: 207.211.31.81, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1587735010; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=q6xmhWNc1SSw372R/dAWh6DZEEQ43T4OXQ2kqtfl8ZY=; b=ZdOLunjFD1YZ6yFg1uQg1wuohomf9HeGCZIMU9bl4xtGVqu89mJ/k685qo5zsLyvZNEZWb hpGFLAS4/EYGJoIBJKiab6Xwa8Pkbtv6bbY+tgeU+2+iALmpQt0qV7cOWdvyhJrq46eqhm si+1ln6VLHAlV6/raWYg9tv6cqJSKes= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-275-Lz0q2n_5Me6uXn3rcWqfzw-1; Fri, 24 Apr 2020 09:30:06 -0400 X-MC-Unique: Lz0q2n_5Me6uXn3rcWqfzw-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 526641895A29; Fri, 24 Apr 2020 13:30:05 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-113-159.ams2.redhat.com [10.36.113.159]) by smtp.corp.redhat.com (Postfix) with ESMTP id E12371002380; Fri, 24 Apr 2020 13:30:03 +0000 (UTC) Subject: Re: [PATCH 1/1] BaseTools: convert diff.order to LF-only To: Leif Lindholm , devel@edk2.groups.io Cc: Andrew Fish , Michael D Kinney , Bob Feng , Liming Gao References: <20200422154652.3853-1-leif@nuviainc.com> From: "Laszlo Ersek" Message-ID: <3f075d5f-7dde-e676-e299-d7a408fe45f8@redhat.com> Date: Fri, 24 Apr 2020 15:30:03 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20200422154652.3853-1-leif@nuviainc.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 04/22/20 17:46, Leif Lindholm wrote: > SetupGit.py sets the git config option diff.orderFile to > {edk2 directory}/BaseTools/Conf/diff.order, to override the default order > in which files are shown in a diff/patch/whatever. This is in imitation > of what is done manually in Laszlo's Unkempt Guide. >=20 > However, the version currently in the tree is in CRLF format, which makes > git interpret e.g. *.c as matching on *.c, finding no matches and > failing to apply the desired reordering. Note: this is true regardless of > whether running on Linux or Windows. >=20 > Convert the file to LF-only to make it work as expected. >=20 > Cc: Bob Feng > Cc: Liming Gao > Signed-off-by: Leif Lindholm > --- >=20 > I'm not going to reveal just how much time I wasted on this before I > figured out what was going wrong... >=20 > I am intending to start prototyping the overall CRLF->native > conversion shortly, but this needs resolving regardless, and in fact we > will need to override the line ending conversion for this file in > gitattributes.=20 >=20 > Arguably, the same logic could be applied to the gitattributes file > itself (in the same directory), but since every effective line in that > has an explicit option following the glob, it triggers no issues at > present. >=20 > This bug is quite likely also behind some accusations I've made on > people not following the correct patch submission process, for which I > apologise. >=20 > Finally, a question: did we have some way of overriding the PatchCheck.py > step in mergify? This patch gets an error per line... > If not, should I submit a separate patch adding yet another exception to > PatchCheck.py >=20 > / > Leif >=20 > BaseTools/Conf/diff.order | 26 +++++++++++++------------- > 1 file changed, 13 insertions(+), 13 deletions(-) >=20 > diff --git a/BaseTools/Conf/diff.order b/BaseTools/Conf/diff.order > index 4361817012c9..f1534f6c187c 100644 > --- a/BaseTools/Conf/diff.order > +++ b/BaseTools/Conf/diff.order > @@ -1,13 +1,13 @@ > -# > -# Copyright (c) 2019, Linaro Ltd. All rights reserved. > -# > -# SPDX-License-Identifier: BSD-2-Clause-Patent > -# > -*.dec > -*.dsc.inc > -*.dsc > -*.fdf > -*.inf > -*.h > -*.vfr > -*.c > +# > +# Copyright (c) 2019, Linaro Ltd. All rights reserved. > +# > +# SPDX-License-Identifier: BSD-2-Clause-Patent > +# > +*.dec > +*.dsc.inc > +*.dsc > +*.fdf > +*.inf > +*.h > +*.vfr > +*.c >=20 Reviewed-by: Laszlo Ersek (I must admit that I use my multi-project shared order file, configured in my ~/.gitconfig file.) Thanks Laszlo