git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Philip Oakley <philipoakley@iee.email>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: git@vger.kernel.org, "Junio C Hamano" <gitster@pobox.com>,
	"Torsten Bögershausen" <tboegi@web.de>,
	"Johannes Sixt" <j6t@kdbg.org>,
	"brian m . carlson" <sandals@crustytoothpaste.net>,
	"Johannes Schindelin" <johannes.schindelin@gmx.de>
Subject: Re: [PATCH] .gitattributes: include `text` attribute for eol attributes
Date: Fri, 3 Feb 2023 16:43:09 +0000	[thread overview]
Message-ID: <43d807f1-07f0-c0a1-e6ae-bdb5df73a565@iee.email> (raw)
In-Reply-To: <230203.86k00yc167.gmgdl@evledraar.gmail.com>

On 03/02/2023 13:40, Ævar Arnfjörð Bjarmason wrote:
> On Fri, Feb 03 2023, Philip Oakley wrote:
>
>> The standard advice for text file eol endings in the .gitattributes file
>> was updated in e28eae3184 (gitattributes: Document the unified "auto"
>> handling, 2016-08-26) with a recent clarification in 8c591dbfce (docs:
>> correct documentation about eol attribute, 2022-01-11), with a follow
>> up comment by the original author in [1] confirming the use of the eol
>> attribute in conjunction with the text attribute.
>>
>> Update Git's .gitattributes file to reflect our own advice.
>>
>> [1] https://lore.kernel.org/git/?q=%3C20220216115239.uo2ie3flaqo3nf2d%40tb-raspi4%3E.
>>
>> Signed-off-by: Philip Oakley <philipoakley@iee.email>
>> ---
>>
>> I was catching up on last year's back emails, and had saved those on
>> eol and text conversion, and was prompted by Torsten's [1] to check
>> my .gitattribute files, only to discover, we aren't providing a good
>> example to others. Let's fix that. 
> This seems sensible, but if we're taking the churn of changing these
> lines maybe it's worth moving or adjusting some of this while-at-it.

Seems reasonable.
I've added in dscho (cc) for consideration of the Git for Windows
viewpoint..
>
> In particular:
>
>>  .gitattributes | 22 +++++++++++-----------
>>  1 file changed, 11 insertions(+), 11 deletions(-)
>>
>> diff --git a/.gitattributes b/.gitattributes
>> index b0044cf272..158c3d45c4 100644
>> --- a/.gitattributes
>> +++ b/.gitattributes
>> @@ -1,17 +1,17 @@
>>  * whitespace=!indent,trail,space
>>  *.[ch] whitespace=indent,trail,space diff=cpp
>> -*.sh whitespace=indent,trail,space eol=lf
>> -*.perl eol=lf diff=perl
>> -*.pl eof=lf diff=perl
>> -*.pm eol=lf diff=perl
>> -*.py eol=lf diff=python
>> -*.bat eol=crlf
> We don't have any *.bat in-tree except in compat/vcbuild/. Shouldn't we
> just create a compat/vcbuild/.gitattributes? This was added in
> https://lore.kernel.org/git/pull.149.v2.git.gitgitgadget@gmail.com/; so
> it's for those specific files.

sensible
>>  CODE_OF_CONDUCT.md -whitespace

Maybe the CODE_OF_CONDUCT.md should also be marked as text?

>> -/Documentation/**/*.txt eol=lf
>> -/command-list.txt eol=lf
>> -/GIT-VERSION-GEN eol=lf
>> -/mergetools/* eol=lf
>> -/t/oid-info/* eol=lf
>> +/Documentation/**/*.txt text eol=lf
> We have a Documentation/.gitattributes, shouldn't we move this
> Documentation/ rule there instead?

ok
>
>> +/command-list.txt text eol=lf
>> +/GIT-VERSION-GEN text eol=lf
>> +/mergetools/* text eol=lf
> ..maybe we should create a mergetools/.gitattributes & move this there?

perhaps. There are probably sufficient listed there to make it work it.
>
>> +/t/oid-info/* text eol=lf
> Ditto t/.gitattributes and this t/oid-info/ rule.
>
>>  /Documentation/git-merge.txt conflict-marker-size=32
>>  /Documentation/gitk.txt conflict-marker-size=32
>>  /Documentation/user-manual.txt conflict-marker-size=32
I'll hold a day or so for any extra contributions.

Philip

  reply	other threads:[~2023-02-03 16:43 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-11  2:15 [PATCH 0/2] Improvements to tests and docs for .gitattributes eol brian m. carlson
2022-01-11  2:15 ` [PATCH 1/2] t0027: add tests for eol without text in .gitattributes brian m. carlson
2022-01-11  2:15 ` [PATCH 2/2] docs: correct documentation about eol attribute brian m. carlson
2022-01-11 18:30   ` Torsten =?unknown-8bit?Q?B=C3=B6gershausen?=
2022-01-11 22:40     ` brian m. carlson
2022-01-12 15:16       ` Torsten =?unknown-8bit?Q?B=C3=B6gershausen?=
2022-02-14  2:08 ` [PATCH v2 0/2] Improvements to tests and docs for .gitattributes eol brian m. carlson
2022-02-14  2:08   ` [PATCH v2 1/2] t0027: add tests for eol without text in .gitattributes brian m. carlson
2022-02-14  2:08   ` [PATCH v2 2/2] docs: correct documentation about eol attribute brian m. carlson
2022-02-14 14:52   ` [PATCH v2 0/2] Improvements to tests and docs for .gitattributes eol Derrick Stolee
2022-02-14 18:15   ` Junio C Hamano
2022-02-14 20:46     ` Torsten =?unknown-8bit?Q?B=C3=B6gershausen?=
2022-02-15  0:15       ` Junio C Hamano
2022-02-15  7:05         ` Johannes Sixt
2022-02-15 22:46           ` brian m. carlson
2022-02-16  7:00             ` Johannes Sixt
2022-02-16 10:28               ` brian m. carlson
2022-02-16 11:52                 ` Torsten =?unknown-8bit?Q?B=C3=B6gershausen?=
2023-02-03 12:59                   ` [PATCH] .gitattributes: include `text` attribute for eol attributes Philip Oakley
2023-02-03 13:40                     ` Ævar Arnfjörð Bjarmason
2023-02-03 16:43                       ` Philip Oakley [this message]
2023-02-04  8:03                     ` Torsten Bögershausen
2023-02-06 21:56                     ` Junio C Hamano
2022-02-16 19:02                 ` [PATCH v2 0/2] Improvements to tests and docs for .gitattributes eol Johannes Sixt

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-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=43d807f1-07f0-c0a1-e6ae-bdb5df73a565@iee.email \
    --to=philipoakley@iee.email \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=j6t@kdbg.org \
    --cc=johannes.schindelin@gmx.de \
    --cc=sandals@crustytoothpaste.net \
    --cc=tboegi@web.de \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).