From: "Rebecca Cran" <rebecca@bsdio.com>
To: "Kinney, Michael D" <michael.d.kinney@intel.com>,
Ard Biesheuvel <ardb@kernel.org>,
"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: Andrew Fish <afish@apple.com>, Leif Lindholm <quic_llindhol@quicinc.com>
Subject: Re: [edk2-devel] [PATCH 1/1] Add a .editorconfig file to tell editors basic formatting details
Date: Tue, 28 Feb 2023 20:22:59 -0700 [thread overview]
Message-ID: <6fe90ba4-7848-a6fb-8263-6cb0af790331@bsdio.com> (raw)
In-Reply-To: <CO1PR11MB49293582C6AE5C0DB40E2BF2D2AC9@CO1PR11MB4929.namprd11.prod.outlook.com>
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 <rebecca@bsdio.com>
>> Sent: Tuesday, February 28, 2023 10:21 AM
>> To: Kinney, Michael D <michael.d.kinney@intel.com>; Ard Biesheuvel <ardb@kernel.org>; devel@edk2.groups.io
>> Cc: Andrew Fish <afish@apple.com>; Leif Lindholm <quic_llindhol@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.kinney@intel.com>
>>>> Sent: Monday, February 27, 2023 10:22 AM
>>>> To: Ard Biesheuvel <ardb@kernel.org>; devel@edk2.groups.io; rebecca@bsdio.com
>>>> Cc: Andrew Fish <afish@apple.com>; Leif Lindholm <quic_llindhol@quicinc.com>; Kinney, Michael D <michael.d.kinney@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 <ardb@kernel.org>
>>>>> Sent: Monday, February 27, 2023 10:18 AM
>>>>> To: devel@edk2.groups.io; rebecca@bsdio.com
>>>>> Cc: Kinney, Michael D <michael.d.kinney@intel.com>; Andrew Fish <afish@apple.com>; Leif Lindholm <quic_llindhol@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 <rebecca@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 <ardb@kernel.org>; devel@edk2.groups.io
>>>>>>>> Cc: Andrew Fish <afish@apple.com>; Leif Lindholm <quic_llindhol@quicinc.com>; Kinney, Michael D
>>>>> <michael.d.kinney@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 <rebecca@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 <rebecca@bsdio.com>
>>>>>>>>> Thank you very much for this - this is very useful.
>>>>>>>>>
>>>>>>>>> Acked-by: Ard Biesheuvel <ardb@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
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
next prev parent reply other threads:[~2023-03-01 3:23 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-27 3:47 [PATCH 1/1] Add a .editorconfig file to tell editors basic formatting details Rebecca Cran
2023-02-27 8:04 ` [edk2-devel] " Ard Biesheuvel
2023-02-27 13:02 ` Rebecca Cran
2023-02-27 16:14 ` Michael D Kinney
2023-02-27 16:35 ` Rebecca Cran
2023-02-27 18:18 ` Ard Biesheuvel
2023-02-27 18:22 ` Michael D Kinney
2023-02-27 18:23 ` Michael D Kinney
2023-02-28 18:20 ` Rebecca Cran
2023-02-28 18:53 ` Ard Biesheuvel
2023-02-28 21:32 ` Michael D Kinney
2023-03-01 3:22 ` Rebecca Cran [this message]
2023-03-01 3:27 ` Michael D Kinney
2023-02-28 6:43 ` Rebecca Cran
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6fe90ba4-7848-a6fb-8263-6cb0af790331@bsdio.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox