Skip to content

Commit 105ab5a

Browse files
PhilipOakleygitster
authored andcommitted
doc add: renormalize is not idempotent for CRCRLF
Bug report https://lore.kernel.org/git/AM0PR02MB56357CC96B702244F3271014E8DC9@AM0PR02MB5635.eurprd02.prod.outlook.com/ noted that a file containing /r/r/n needed renormalising twice. This is by design. Lone CR characters, not paired with an LF, are left unchanged. Note the lack of idempotentness of the "clean" filter in the documentation. Renormalize was introduced at 9472935 (add: introduce "--renormalize", Torsten Bögershausen, 2017-11-16) Signed-off-by: Philip Oakley <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent dc8c8de commit 105ab5a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Documentation/git-add.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,8 @@ for "git add --no-all <pathspec>...", i.e. ignored removed files.
188188
forcibly add them again to the index. This is useful after
189189
changing `core.autocrlf` configuration or the `text` attribute
190190
in order to correct files added with wrong CRLF/LF line endings.
191-
This option implies `-u`.
191+
This option implies `-u`. Lone CR characters are untouched, so
192+
cleaning not idempotent. A CRCRLF sequence cleans to CRLF.
192193

193194
--chmod=(+|-)x::
194195
Override the executable bit of the added files. The executable

0 commit comments

Comments
 (0)