Thanks Mike.

Line endings have been a consistent problem creators for me for the .sh and 
.bat files while working on Python UEFI project.

At times I used to run dos2linux command to convert the .sh scripts line 
endings from \r\n format to \n format to fix the compilation issues on Linux.
So, thought of using the .gitattributes feature from github to normalize the 
line endings for these 2 types of text files.

Will wait to hear from Leif on the changes being evaluated for Tinocore repos 
on Line endings.

Regards,
JP
-----Original Message-----
From: Kinney, Michael D <[email protected]> 
Sent: Friday, July 12, 2024 9:29 PM
To: Jayaprakash, N <[email protected]>; [email protected]; Leif 
Lindholm <[email protected]>
Cc: Rebecca Cran <[email protected]>; Kinney, Michael D 
<[email protected]>
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.

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 <[email protected]>
> Sent: Friday, July 12, 2024 7:27 AM
> To: [email protected]
> Cc: Jayaprakash, N <[email protected]>; Rebecca Cran 
> <[email protected]>; Kinney, Michael D <[email protected]>
> 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 <[email protected]>
> Cc: Michael D Kinney <[email protected]>
> Cc: Jayaprakash N <[email protected]>
> Signed-off-by: Jayaprakash N <[email protected]>
> ---
>  .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
> --
> 2.45.1.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#119914): https://edk2.groups.io/g/devel/message/119914
Mute This Topic: https://groups.io/mt/107182920/21656
Group Owner: [email protected]
Unsubscribe: https://edk2.groups.io/g/devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to