From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail05.groups.io (mail05.groups.io [45.79.224.7]) by spool.mail.gandi.net (Postfix) with ESMTPS id F194E941A45 for ; Thu, 18 Jul 2024 17:55:23 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=zYeYJTIUa5+44j9Dup32E4IYXUEIh+TV8R78sIKXHNE=; c=relaxed/simple; d=groups.io; h=Message-ID:Date:MIME-Version:User-Agent:Subject:To:CC:References:From:In-Reply-To:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20240206; t=1721325323; v=1; b=cGb3oTcx56/hVja3gZPxovSvtNYyLXzvOJtRdF66UjM+bhhy+Jq5TG3PMF/wURMJ144U4fnb 04gT7iolSYluWLMd+xBBhW7+CmkqcQFaq6TQRsbU5p/+Ijxr9Soju+1fMCOP//FBucRQJFZnPOk LkgjYqPSb56TJab0ZxD1hmR4iqOoZkgekyl//oC+oC0q7QLKUC/Et5D6Kg2wl4ZDVTCZjFJtLj3 HFps0q2UdAA+Z9cneoIEMs8wgFFWaig5qvAxxq+bMR5iNXyX2wBlf+FVgxG2r1Krj4LImtbhaJr 965GttHpEP2DuvwqH9pjc0qX9YRj9HGCfkP5fqbQcSIng== X-Received: by 127.0.0.2 with SMTP id 3m4oYY7687511xK9giG4ZFbP; Thu, 18 Jul 2024 10:55:22 -0700 X-Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by mx.groups.io with SMTP id smtpd.web10.612.1721325321571635513 for ; Thu, 18 Jul 2024 10:55:21 -0700 X-Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 46IA95so031079; Thu, 18 Jul 2024 17:55:19 GMT X-Received: from nasanppmta04.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 40dwfpp6gn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 18 Jul 2024 17:55:18 +0000 (GMT) X-Received: from nasanex01c.na.qualcomm.com (nasanex01c.na.qualcomm.com [10.45.79.139]) by NASANPPMTA04.qualcomm.com (8.17.1.19/8.17.1.19) with ESMTPS id 46IHtHkR019889 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 18 Jul 2024 17:55:17 GMT X-Received: from [10.111.135.62] (10.80.80.8) by nasanex01c.na.qualcomm.com (10.45.79.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Thu, 18 Jul 2024 10:55:16 -0700 Message-ID: Date: Thu, 18 Jul 2024 18:55:14 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [edk2-devel] [edk2-libc Patch 1/1] edk2-libc: add .gitattributes to ensure right line endings in .sh .bat To: "Jayaprakash, N" , "devel@edk2.groups.io" , "Kinney, Michael D" CC: Rebecca Cran References: <20240712142844.1317-1-n.jayaprakash@intel.com> <20240712142844.1317-2-n.jayaprakash@intel.com> <53f09dca-d305-45c2-8714-9e5ef2390512@quicinc.com> From: "Leif Lindholm" In-Reply-To: X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nasanex01c.na.qualcomm.com (10.45.79.139) X-QCInternal: smtphost X-Proofpoint-ORIG-GUID: uN4-b35wssQoVITb04jqvAqGvR5jDqgO X-Proofpoint-GUID: uN4-b35wssQoVITb04jqvAqGvR5jDqgO Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Resent-Date: Thu, 18 Jul 2024 10:55:21 -0700 Resent-From: quic_llindhol@quicinc.com Reply-To: devel@edk2.groups.io,quic_llindhol@quicinc.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: CJbhfqyETAOJQZ1sTXQbwWfTx7686176AA= Content-Language: en-GB Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=cGb3oTcx; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=quicinc.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.224.7 as permitted sender) smtp.mailfrom=bounce@groups.io On 2024-07-18 07:47, Jayaprakash, N wrote: > Regarding the below comment from Lief. >=20 > Now, as for the suggestion: this isn't wrong, but can you explain what pr= oblem it is solving? >=20 > <> As a developer and also as a maintainer the lines endings have bee= n > a consistent problem as I have seen patches coming with mixed line > endi= ngs some times it take quite a while to fix these simple line>=20 ending issues. I agree it's annoying, but if it takes a noticeable amount of time to=20 fix, it sounds to me like you're manually editing things that tools can=20 do for you. (Admittedly, git is one of those tools.) And as Mike says,=20 there's the helper scripts and CI. > I want to start small through .gtiattributes usage for the .sh and > .bat scripts to normalize the line endings to LF so that irrespective > of the user environment the line endings are always stored as LF in > git repo but presented to the users in LF or CRLF as per their > environment. Thought of using this feature of github in a lower scale > to make it easy for the developers and maintainers of the edk2-libc proje= ct. >=20 > If there is a general alignment that this change need not go, > then I will close the BZ as won't fix. Like I said, there's nothing actually *wrong* about doing what you=20 propose. It's more a question of how we maintain (or not) consistency=20 between, and within, the repos. Do we keep edk2-libc as a special thing on the side? If so I guess it could keep its own .gitattributes. If not, it should use the one in edk2/BaseTools. If so, that affects all the repos. If it affects all the repos, why specifically .sh and .bat? Yes, it doesn't break the build if it sneaks into a .c file, or a .inf,=20 but it breaks CI. Sometimes. So should we specify .c, .h, .inf, .dsc,=20 .dec, .py, .vfr as well? As it stands, I'd prefer to leave this alone until do the CRLF->LF=20 conversion and can migrate to core.autocrlf=3Dauto. At that point, I=20 expect most of these mixups will go away. And if they don't, we could=20 always revisit then. I do intend to get back to the CRLF->LF conversion work once the shock=20 from the Github-PR switch has settled. Regards, Leif > Regards, > JP >=20 > -----Original Message----- > From: Leif Lindholm > Sent: Wednesday, July 17, 2024 7:55 PM > To: devel@edk2.groups.io; Jayaprakash, N ; Kinne= y, Michael D > Cc: Rebecca Cran > Subject: Re: [edk2-devel] [edk2-libc Patch 1/1] edk2-libc: add .gitattrib= utes to ensure right line endings in .sh .bat >=20 > Hi, >=20 > The address I am replying from is the email address I use for tianocore w= ork. Messages sent elsewhere are going to end up misfiled and likely lost. >=20 > On 2024-07-17 06:55, Jayaprakash, N wrote: >> Hi Lefi, >> >> Do you have any recommendations on this? >> >> Regards, >> JP >> >> -----Original Message----- >> From: Kinney, Michael D >> Sent: Friday, July 12, 2024 9:29 PM >> To: Jayaprakash, N ; devel@edk2.groups.io; >> Leif Lindholm >> Cc: Rebecca Cran ; Kinney, Michael D >> >> Subject: RE: [edk2-libc Patch 1/1] edk2-libc: add .gitattributes to >> ensure right line endings in .sh .bat >> >> + Leif >> >> .gitattributes is not used in other TianoCore repos. >=20 > Technically sort of correct, but see below. >=20 >> This feature changes the line endings locally when checked out. >> >> Instead, the edk2 repo uses a CI check like PatchCheck.py to make sure f= iles with specific extensions have the correct line endings when they are c= hecked in and files are checked out unmodified. >> >> I know Leif has been evaluating some line ending changes to TianoCore Re= pos. Don't know if this direction is in alignment with those ideas or not. >> >> Mike >> >>> -----Original Message----- >>> From: Jayaprakash, N >>> Sent: Friday, July 12, 2024 7:27 AM >>> To: devel@edk2.groups.io >>> Cc: Jayaprakash, N ; Rebecca Cran >>> ; Kinney, Michael D >>> Subject: [edk2-libc Patch 1/1] edk2-libc: add .gitattributes to >>> ensure right line endings in .sh .bat >>> >>> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4809 >>> >>> This commit adds .gitattributes file with the right settings to >>> preserve the correct line endings for .sh and .bat files as per the >>> Linxu and Windows line ending conventions respectively. > >> >>> Cc: Rebecca Cran >>> Cc: Michael D Kinney >>> Cc: Jayaprakash N >>> Signed-off-by: Jayaprakash N >>> --- >>> .gitattributes | 2 ++ >>> 1 file changed, 2 insertions(+) >>> create mode 100644 .gitattributes >>> >>> diff --git a/.gitattributes b/.gitattributes new file mode 100644 >>> index 0000000..3fd9ec8 >>> --- /dev/null >>> +++ b/.gitattributes >>> @@ -0,0 +1,2 @@ >>> +*.bat text eol=3Dcrlf >>> +*.sh text eol=3Dlf >>> \ No newline at end of file >=20 > ^ This is not a good look for any submission, but especially not one deal= ing with line endings. Please manually look at patches before sending them = out. >=20 > Now, as for the suggestion: this isn't wrong, but can you explain what pr= oblem it is solving? >=20 > I had a look in edk2-libc and all the .sh files have LF line endings and = all the .bat files have CRLF line endings. >=20 > Now, if we *did* want to do this, I would strongly prefer a patch to edk2= /BaseTools/Conf/gitattributes, which is applied in any repo SetupGit.py has= been executed in. >=20 > But ultimately I want to convert the repos completely to LF line endings = except for where special cases exist (which *should* be described in > [.]gitattributes) and then move to enable core.autocrlf. >=20 > / > Leif >=20 >>> -- >>> 2.45.1.windows.1 >> >> >> >>=20 >> >> >=20 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#119973): https://edk2.groups.io/g/devel/message/119973 Mute This Topic: https://groups.io/mt/107182920/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-