From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46]) by mx.groups.io with SMTP id smtpd.web12.133.1588007191295408081 for ; Mon, 27 Apr 2020 10:06:31 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@nuviainc-com.20150623.gappssmtp.com header.s=20150623 header.b=Ebh/V+Ry; spf=pass (domain: nuviainc.com, ip: 209.85.221.46, mailfrom: leif@nuviainc.com) Received: by mail-wr1-f46.google.com with SMTP id g13so21429718wrb.8 for ; Mon, 27 Apr 2020 10:06:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuviainc-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=TE20fS8KPUMMtdtZDo0ygQQ9TTpqovCSVj9QiEYyN/E=; b=Ebh/V+RyBI2zPDNGjJNmPGrrXDq7RmJ7xro6nYYJT2YPop9QCdx/vdEWtHKB3pXENy h5tTqXqRFgbERT6ggB20VuQzk/3s7WnWl+of6hAfAMJ5jMtbRjE0F8k2+wiBSKXbk+8e WanKU6Vc6NcdrtyofM45RgmLKrPq6WzI02CoELnq1ai+DDdeks0MEnHjJGcRBKsv0w3n 7t+LDIOWrB4DiFa4Ihltu3c81wcNORWTt9mpgqMIG6pHwb2eq6DwpXA1gnkLkk68L1OV pZgLw+YvSsH68Q2OOfpZmxVXR3fCWvfNpW/st8z0+iVNLg680C9oYiDWLhG/IvQPvjVr AJ5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=TE20fS8KPUMMtdtZDo0ygQQ9TTpqovCSVj9QiEYyN/E=; b=QAwBC4mdZmhj3Q76hUCl8rSRjzz4tIZVIgd4eMtDSAGXLrNOtgfpHm+uCvKU5Pqhqj r9np54Jihj0oU8moQLiHdgWGBi53hgJttQ+PVq9Cc5maYXtAEzPtjON5+dgDpc0WrriE IPrGXbPzUHNVp58dRvcOLmdIuezAsTWQ7RrhZeYldnMzSPcgqNaGNNnrxYr0lwg2xIFG JWMaNmlB6Rd972nqXMKsbQ3LLvBULZ11+RWB5RJgA5xXbTVuJCvYIuQaoTJY4on4uwoz qOeIKiwhsBbzOGyAbpqrVUjMMRuTBfv3C1GrNzo9QiiX+kxEvP5rXYuPQjLWdkWa7jPo 08ww== X-Gm-Message-State: AGi0Pub6ieqIX/YSU8w9LHP0U1KiIDnHf3859e3vR5KHNr8Bbjk0V2r4 c7BVv11TmRcsaRCbJHXsvn6hPQ== X-Google-Smtp-Source: APiQypKktZEdO8wv7MsLSw/VXM3gbIhHIlS0ag7GVOtNVNGVgoHE2DYVCoNolQSGcQ5J+mZzQiMp8A== X-Received: by 2002:adf:e943:: with SMTP id m3mr27423976wrn.248.1588007189843; Mon, 27 Apr 2020 10:06:29 -0700 (PDT) Return-Path: Received: from vanye ([2001:470:1f09:12f0:b26e:bfff:fea9:f1b8]) by smtp.gmail.com with ESMTPSA id b66sm17020621wmh.12.2020.04.27.10.06.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Apr 2020 10:06:29 -0700 (PDT) Date: Mon, 27 Apr 2020 18:06:27 +0100 From: "Leif Lindholm" To: "Kinney, Michael D" Cc: "Gao, Liming" , "devel@edk2.groups.io" , "lersek@redhat.com" , Andrew Fish , "Feng, Bob C" , Sean Brogan Subject: Re: [edk2-devel] [PATCH 1/1] BaseTools: convert diff.order to LF-only Message-ID: <20200427170627.GV14075@vanye> References: <20200422154652.3853-1-leif@nuviainc.com> <3f075d5f-7dde-e676-e299-d7a408fe45f8@redhat.com> MIME-Version: 1.0 In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi Mike, I was thinking (for post-conversion) we may end up needing something like .git* text eol=lf in our gitattributes file (which itself unfortunately currently does not follow that format). If we were to rename BaseTools/Conf/diff.order and BaseTools/Conf/gitattributes (to say .git-difforder and .gitattributes) and update SetupGit.py to use the new names, that would let us cover these (and future ones) with a single test. / Leif On Mon, Apr 27, 2020 at 16:22:11 +0000, Kinney, Michael D wrote: > Liming, > > Should we update PatchCheck.py to allow LF only for files with > a diff.order extension? We already have exceptions for .sh and > .gitmodules files. > > if self.filename.endswith('.sh'): > # > # Do not enforce CR/LF line endings for linux shell scripts. > # > self.force_crlf = False > if self.filename == '.gitmodules': > # > # .gitmodules is updated by git and uses tabs and LF line > # endings. Do not enforce no tabs and do not enforce > # CR/LF line endings. > # > self.force_crlf = False > self.force_notabs = False > > > Mike > > > -----Original Message----- > > From: Gao, Liming > > Sent: Monday, April 27, 2020 8:45 AM > > To: devel@edk2.groups.io; lersek@redhat.com; Leif > > Lindholm > > Cc: Andrew Fish ; Kinney, Michael D > > ; Feng, Bob C > > ; Sean Brogan > > > > Subject: RE: [edk2-devel] [PATCH 1/1] BaseTools: > > convert diff.order to LF-only > > > > Leif: > > I am OK for this change. Reviewed-by: Liming Gao > > > > > > As you say, this patch doesn't pass patchcheck. I > > suggest PatchCheck CI pipe line can support the > > exception. > > > > Thanks > > Liming > > > -----Original Message----- > > > From: devel@edk2.groups.io On > > Behalf Of Laszlo Ersek > > > Sent: Friday, April 24, 2020 9:30 PM > > > To: Leif Lindholm ; > > devel@edk2.groups.io > > > Cc: Andrew Fish ; Kinney, Michael D > > ; Feng, Bob C > > ; Gao, > > > Liming > > > Subject: Re: [edk2-devel] [PATCH 1/1] BaseTools: > > convert diff.order to LF-only > > > > > > 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. > > > > > > > > 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. > > > > > > > > Convert the file to LF-only to make it work as > > expected. > > > > > > > > Cc: Bob Feng > > > > Cc: Liming Gao > > > > Signed-off-by: Leif Lindholm > > > > --- > > > > > > > > I'm not going to reveal just how much time I wasted > > on this before I > > > > figured out what was going wrong... > > > > > > > > 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. > > > > > > > > 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. > > > > > > > > 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. > > > > > > > > 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 > > > > > > > > / > > > > Leif > > > > > > > > BaseTools/Conf/diff.order | 26 +++++++++++++------ > > ------- > > > > 1 file changed, 13 insertions(+), 13 deletions(-) > > > > > > > > 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 > > > > > > > > > > Reviewed-by: Laszlo Ersek > > > > > > (I must admit that I use my multi-project shared > > order file, configured > > > in my ~/.gitconfig file.) > > > > > > Thanks > > > Laszlo > > > > > > > > > >