diff mbox series

[v2,3/3] docs: make notes regarding credential line reading

Message ID 61baea106115277fb0c39d3b2a79770306f5a465.1601293224.git.gitgitgadget@gmail.com (mailing list archive)
State New, archived
Headers show
Series Prepare git credential to read input with DOS line endings | expand

Commit Message

Johannes Schindelin via GitGitGadget Sept. 28, 2020, 11:40 a.m. UTC
From: Nikita Leonov <nykyta.leonov@gmail.com>

This commit adds notes to git-credential.txt and to gitcredentials.txt
specifying that 'LF' and 'CR/LF' endings are treated the same.

Signed-off-by: Nikita Leonov <nykyta.leonov@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
 Documentation/git-credential.txt | 4 +++-
 Documentation/gitcredentials.txt | 2 ++
 2 files changed, 5 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/Documentation/git-credential.txt b/Documentation/git-credential.txt
index 31c81c4c02..9cf25126f2 100644
--- a/Documentation/git-credential.txt
+++ b/Documentation/git-credential.txt
@@ -114,7 +114,9 @@  The key may contain any bytes except `=`, newline, or NUL. The value may
 contain any bytes except newline or NUL.
 
 In both cases, all bytes are treated as-is (i.e., there is no quoting,
-and one cannot transmit a value with newline or NUL in it). The list of
+and one cannot transmit a value with newline or NUL in it). Note that
+Git will treat a carriage return before the final newline as part of
+line ending, and not part of the data. The list of
 attributes is terminated by a blank line or end-of-file.
 
 Git understands the following attributes:
diff --git a/Documentation/gitcredentials.txt b/Documentation/gitcredentials.txt
index 758bf39ba3..184079eaa4 100644
--- a/Documentation/gitcredentials.txt
+++ b/Documentation/gitcredentials.txt
@@ -141,6 +141,8 @@  entry for `https://example.com/bar/baz.git` (in addition to matching the config
 entry for `https://example.com`) but will not match a config entry for
 `https://example.com/bar`.
 
+Note that Git will treat a carriage return before the final newline as part
+of line ending, and not part of the data.
 
 CONFIGURATION OPTIONS
 ---------------------