Hi,

The address I am replying from is the email address I use for tianocore work. Messages sent elsewhere are going to end up misfiled and likely lost.

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 <michael.d.kin...@intel.com>
Sent: Friday, July 12, 2024 9:29 PM
To: Jayaprakash, N <n.jayaprak...@intel.com>; devel@edk2.groups.io; Leif Lindholm 
<llind...@qti.qualcomm.com>
Cc: Rebecca Cran <rebe...@bsdio.com>; Kinney, Michael D 
<michael.d.kin...@intel.com>
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.

Technically sort of correct, but see below.

This feature changes the line endings locally when checked out.

Instead, the edk2 repo uses a CI check like PatchCheck.py to make sure files 
with specific extensions have the correct line endings when they are checked in 
and files are checked out unmodified.

I know Leif has been evaluating some line ending changes to TianoCore Repos.  
Don't know if this direction is in alignment with those ideas or not.

Mike

-----Original Message-----
From: Jayaprakash, N <n.jayaprak...@intel.com>
Sent: Friday, July 12, 2024 7:27 AM
To: devel@edk2.groups.io
Cc: Jayaprakash, N <n.jayaprak...@intel.com>; Rebecca Cran
<rebe...@bsdio.com>; Kinney, Michael D <michael.d.kin...@intel.com>
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=4809

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 <rebe...@bsdio.com>
Cc: Michael D Kinney <michael.d.kin...@intel.com>
Cc: Jayaprakash N <n.jayaprak...@intel.com>
Signed-off-by: Jayaprakash N <n.jayaprak...@intel.com>
---
  .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=crlf
+*.sh text eol=lf
\ No newline at end of file

^ This is not a good look for any submission, but especially not one dealing with line endings. Please manually look at patches before sending them out.

Now, as for the suggestion: this isn't wrong, but can you explain what problem it is solving?

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.

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.

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.

/
    Leif

--
2.45.1.windows.1









-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#119953): https://edk2.groups.io/g/devel/message/119953
Mute This Topic: https://groups.io/mt/107182920/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to