From: Alex Henrie <alexhenrie24@gmail.com>
To: git@vger.kernel.org, eyvind.bernhardsen@gmail.com, tboegi@web.de,
gitster@pobox.com, sandals@crustytoothpaste.net
Cc: Alex Henrie <alexhenrie24@gmail.com>
Subject: [PATCH v4 0/1] docs: rewrite the documentation of the text and eol attributes
Date: Tue, 2 May 2023 22:46:55 -0600 [thread overview]
Message-ID: <20230503044656.221175-1-alexhenrie24@gmail.com> (raw)
In-Reply-To: <20230501023533.35370-1-alexhenrie24@gmail.com>
Changes from v3:
- Rewrite sentence about how `eol` can imply `text`
- Use the phrase "all other platforms" instead of the word "Unix"
Alex Henrie (1):
docs: rewrite the documentation of the text and eol attributes
Documentation/gitattributes.txt | 59 +++++++++++++++++----------------
1 file changed, 31 insertions(+), 28 deletions(-)
Range-diff against v3:
1: 3d5985bc28 ! 1: eccf627db1 docs: rewrite the documentation of the text and eol attributes
@@ Commit message
does not do anything to the line endings either.
On top of that, in several places the documentation for the eol
- attribute sounds like it can turn on normalization on checkin, but eol
- only controls conversion on checkout. It also sounds like setting eol
+ attribute sounds like either it does not affect normalization on checkin
+ or it forces normalization on checkin. It also sounds like setting eol
(or setting a config variable) is required to turn on conversion on
checkout, but the text attribute can turn on conversion on checkout by
itself if eol is unspecified.
@@ Documentation/gitattributes.txt: unspecified.
-`text=auto` is set. Adding the path to the index again will normalize
-the line endings in the index.
+This attribute marks a path to use a specific line-ending style in the
-+working tree when it is checked out. This attribute has effect only if
-+the `text` attribute is set or unspecified, or if it is set to `auto`,
-+the file is detected as text, and it is stored with LF endings in the
-+index.
++working tree when it is checked out. It has effect only if `text` or
++`text=auto` is set (see above), but specifying `eol` automatically sets
++`text` if `text` was left unspecified.
Set to string value "crlf"::
@@ Documentation/gitattributes.txt: unspecified.
+ If the `eol` attribute is unspecified for a file, its line endings
+ in the working directory are determined by the `core.autocrlf` or
+ `core.eol` configuration variable (see the definitions of those
-+ options in linkgit:git-config[1]). The default if `text` is set but
-+ neither of those variables is is `eol=lf` on Unix and `eol=crlf` on
-+ Windows.
++ options in linkgit:git-config[1]). If `text` is set but neither of
++ those variables is, the default is `eol=crlf` on Windows and
++ `eol=lf` on all other platforms.
Backwards compatibility with `crlf` attribute
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
--
2.40.1
next prev parent reply other threads:[~2023-05-03 4:48 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-01 2:35 [PATCH v3 0/1] docs: rewrite the documentation of the text and eol attributes Alex Henrie
2023-05-01 2:35 ` [PATCH v3 1/1] " Alex Henrie
2023-05-02 4:17 ` Torsten Bögershausen
2023-05-02 5:59 ` Alex Henrie
2023-05-02 16:27 ` Felipe Contreras
2023-05-03 4:46 ` Alex Henrie [this message]
2023-05-03 4:46 ` [PATCH v4 " Alex Henrie
2023-05-03 16:06 ` Junio C Hamano
2023-05-03 19:00 ` Torsten Bögershausen
2023-05-03 19:27 ` Junio C Hamano
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230503044656.221175-1-alexhenrie24@gmail.com \
--to=alexhenrie24@gmail.com \
--cc=eyvind.bernhardsen@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--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.
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 NNTP newsgroup(s).