Skip to content

Commit 6e20f7c

Browse files
committed
docs: make notes regarding credential line reading
This commit adds notes to git-credential.txt and to gitcredentials.txt specifying that 'LF' and 'CR/LF' endings are treated the same.
1 parent 99d0030 commit 6e20f7c

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

Documentation/git-credential.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,9 @@ specified by a key-value pair, separated by an `=` (equals) sign,
112112
followed by a newline. The key may contain any bytes except `=`,
113113
newline, or NUL. The value may contain any bytes except newline or NUL.
114114
In both cases, all bytes are treated as-is (i.e., there is no quoting,
115-
and one cannot transmit a value with newline or NUL in it). The list of
115+
and one cannot transmit a value with newline or NUL in it). Note that
116+
Git will treat a carriage return before the final newline as part of
117+
line ending, and not part of the data. The list of
116118
attributes is terminated by a blank line or end-of-file.
117119
Git understands the following attributes:
118120

Documentation/gitcredentials.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,8 @@ entry for `https://example.com/bar/baz.git` (in addition to matching the config
139139
entry for `https://example.com`) but will not match a config entry for
140140
`https://example.com/bar`.
141141

142+
Note that Git will treat a carriage return before the final newline as part
143+
of line ending, and not part of the data.
142144

143145
CONFIGURATION OPTIONS
144146
---------------------

0 commit comments

Comments
 (0)