Mike,

It looks like the line endings and tab/spaces of .gitmodules doesn't matter: do we still want to list a preference for it?


"Given the following, I'm not sure line endings matter at all to git?


$ file .gitmodules
.gitmodules: ASCII text, with CRLF, LF line terminators
$ file .gitignore
.gitignore: ASCII text, with CRLF line terminators


There's a CRLF in .gitmodules at the end of the brotli section.

We could certainly specify that LF is _preferred_ for all .git files though?"


On 2/28/23 2:32 PM, Kinney, Michael D wrote:
What about .gitmodules?

Mike

-----Original Message-----
From: Rebecca Cran <rebe...@bsdio.com>
Sent: Tuesday, February 28, 2023 10:21 AM
To: Kinney, Michael D <michael.d.kin...@intel.com>; Ard Biesheuvel 
<a...@kernel.org>; devel@edk2.groups.io
Cc: Andrew Fish <af...@apple.com>; Leif Lindholm <quic_llind...@quicinc.com>
Subject: Re: [edk2-devel] [PATCH 1/1] Add a .editorconfig file to tell editors 
basic formatting details

Before I sent out an official v2 patch, does the following look good?


diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 000000000000..587d5bbaa884
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,31 @@
+# EditorConfig file: https://EditorConfig.org
+
+root = true
+
+[*]
+charset = latin1
+end_of_line = crlf
+indent_style = space
+indent_size = 2
+insert_final_newline = true
+trim_trailing_whitespace = true
+
+[*.py]
+charset = utf-8
+indent_style = space
+indent_size = 4
+
+[*.sh]
+end_of_line = lf
+
+[.gitattributes]
+end_of_line = lf
+
+[.mailmap]
+charset = utf-8
+
+[Maintainers.txt]
+charset = utf-8
+
+[Makefile,GNUmakefile]
+indent_style = tab


--
Rebecca Cran


On 2/27/23 11:23 AM, Kinney, Michael D wrote:
.gitmodules also must also use tabs.

-----Original Message-----
From: Kinney, Michael D <michael.d.kin...@intel.com>
Sent: Monday, February 27, 2023 10:22 AM
To: Ard Biesheuvel <a...@kernel.org>; devel@edk2.groups.io; rebe...@bsdio.com
Cc: Andrew Fish <af...@apple.com>; Leif Lindholm <quic_llind...@quicinc.com>; Kinney, 
Michael D <michael.d.kin...@intel.com>
Subject: RE: [edk2-devel] [PATCH 1/1] Add a .editorconfig file to tell editors 
basic formatting details

.gitmodules must be lf.  Not sure about other git config files.

Mike

-----Original Message-----
From: Ard Biesheuvel <a...@kernel.org>
Sent: Monday, February 27, 2023 10:18 AM
To: devel@edk2.groups.io; rebe...@bsdio.com
Cc: Kinney, Michael D <michael.d.kin...@intel.com>; Andrew Fish <af...@apple.com>; 
Leif Lindholm <quic_llind...@quicinc.com>
Subject: Re: [edk2-devel] [PATCH 1/1] Add a .editorconfig file to tell editors 
basic formatting details

On Mon, 27 Feb 2023 at 17:35, Rebecca Cran <rebe...@bsdio.com> wrote:
Is it just .sh files that need lf endings, or are there others?

I think this only applies to .sh files.

On 2/27/23 9:14 AM, Michael D Kinney wrote:
There are a few file types that must be lf instead of crlf.  Can those be added 
as well?

Mike

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Rebecca Cran
Sent: Monday, February 27, 2023 5:03 AM
To: Ard Biesheuvel <a...@kernel.org>; devel@edk2.groups.io
Cc: Andrew Fish <af...@apple.com>; Leif Lindholm <quic_llind...@quicinc.com>; 
Kinney, Michael D
<michael.d.kin...@intel.com>
Subject: Re: [edk2-devel] [PATCH 1/1] Add a .editorconfig file to tell editors 
basic formatting details

On 2/27/23 1:04 AM, Ard Biesheuvel wrote:

On Mon, 27 Feb 2023 at 04:47, Rebecca Cran <rebe...@bsdio.com> wrote:
Add a .editorconfig file which editors can use for basic formatting
details of files, such as tabs/spaces, line endings etc.

Signed-off-by: Rebecca Cran <rebe...@bsdio.com>
Thank you very much for this - this is very useful.

Acked-by: Ard Biesheuvel <a...@kernel.org>

Could we add .dsc/.inf/.dec/etc files as well?
I'll move the c/c++ indentation up to the [*] section so it applies to
.dsc/.inf/etc too.


--
Rebecca Cran













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


Reply via email to