git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Philip Oakley <philipoakley@iee.email>
To: Junio C Hamano <gitster@pobox.com>,
	Philip Oakley via GitGitGadget <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 4/4] doc add: renormalize is not idempotent for CRCRLF
Date: Sun, 10 Jul 2022 22:52:45 +0100	[thread overview]
Message-ID: <e45c4fc1-3a30-726c-51f3-00caeca0a552@iee.email> (raw)
In-Reply-To: <xmqqilo6t2qy.fsf@gitster.g>

On 09/07/2022 22:06, Junio C Hamano wrote:
> "Philip Oakley via GitGitGadget" <gitgitgadget@gmail.com> writes:
>
>> From: Philip Oakley <philipoakley@iee.email>
>>
>> Bug report
>>  https://lore.kernel.org/git/AM0PR02MB56357CC96B702244F3271014E8DC9@AM0PR02MB5635.eurprd02.prod.outlook.com/
>> noted that a file containing /r/r/n needed renormalising twice.
> Did you mean backslash, not forward?

Correct. Too many years of Windows.
>
>> 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.
> OK.
>
>
>> Renormalize was introduced at 9472935d81e (add: introduce "--renormalize",
>> Torsten Bögershausen, 2017-11-16)
> Does this need to be said "HERE", rather than leaving it to run "git
> blame" for those who became curious?

It was a misguided reminder to cc Torsten about his recollection of the
CRCRLF issue. I'll remove it. I see Torsten has also commented.
>
>> Signed-off-by: Philip Oakley <philipoakley@iee.email>
>> ---
>>  Documentation/git-add.txt | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/Documentation/git-add.txt b/Documentation/git-add.txt
>> index 11eb70f16c7..c4a5ad11a6b 100644
>> --- a/Documentation/git-add.txt
>> +++ b/Documentation/git-add.txt
>> @@ -188,7 +188,8 @@ for "git add --no-all <pathspec>...", i.e. ignored removed files.
>>  	forcibly add them again to the index.  This is useful after
>>  	changing `core.autocrlf` configuration or the `text` attribute
>>  	in order to correct files added with wrong CRLF/LF line endings.
>> -	This option implies `-u`.
>> +	This option implies `-u`. Lone CR characters are untouched, so
>> +	cleaning *^* not idempotent. A CRCRLF sequence cleans to CRLF.
> Lack of verb BE somewhere. 
'^' It took me three re-reads to see my mistyping as my head knew what
I'd meant to write, I've marked above as a note to self.
Aside: Are there any guides / suggestions / how-to's for on-line
reviewing that you can recommend o
> Do we expect our readers all understand the math-y word? 
Ok. It's mainly used in the test directory, and fsmonitor.h, but not in
the user docs.

>  It is not
> too hard to explain it to math-uninitiated, e.g.
>
>     This option implies `-u`.  Note that running renormalize again
>     on the result of running renormalize may make it even "more
>     normal".  A CR-CR-LF sequence would first renormalize to CR-LF
>     (the first CR, a lone CR, is left intact, and CR-LF that follows
>     normalizes to LF).  If you run renormalize again, the resulting
>     CR-LF will normalize down to LF.
>
Torsten had a shorter suggestion I'll also look at.

Philip

  reply	other threads:[~2022-07-10 21:52 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-09 16:56 [PATCH 0/4] Add some Glossary terms, and extra renormalize information Philip Oakley via GitGitGadget
2022-07-09 16:56 ` [PATCH 1/4] glossary: add Object DataBase (ODB) abbreviation Philip Oakley via GitGitGadget
2022-07-09 16:56 ` [PATCH 2/4] glossary: add commit graph description Philip Oakley via GitGitGadget
2022-07-09 21:20   ` Junio C Hamano
2022-07-10 21:37     ` Philip Oakley
2022-08-30 14:33       ` Philip Oakley
2022-07-09 16:56 ` [PATCH 3/4] glossary: add reachability bitmap description Philip Oakley via GitGitGadget
2022-07-09 16:56 ` [PATCH 4/4] doc add: renormalize is not idempotent for CRCRLF Philip Oakley via GitGitGadget
2022-07-09 21:06   ` Junio C Hamano
2022-07-10 21:52     ` Philip Oakley [this message]
2022-07-10 22:04       ` Junio C Hamano
2022-07-10 22:25         ` Philip Oakley
2022-07-10  7:48   ` Torsten Bögershausen
2022-07-10 22:09     ` Philip Oakley
2022-08-05 22:26       ` Junio C Hamano
2022-08-06 19:22         ` Torsten Bögershausen
2022-08-08 14:32         ` Philip Oakley
2022-08-08 16:21           ` Junio C Hamano
2022-08-09 18:44           ` Torsten Bögershausen
2022-08-10 14:44         ` [PATCH v2 0/1] .. Add extra renormalize information Philip Oakley
2022-08-10 14:44           ` [PATCH v2 1/1] doc add: renormalize is not idempotent for CRCRLF Philip Oakley
2022-08-10 17:11             ` Torsten Bögershausen
2022-08-10 17:42             ` Junio C Hamano
2022-07-09 21:34 ` [PATCH 0/4] Add some Glossary terms, and extra renormalize information Junio C Hamano
2022-07-10 15:20   ` Philip Oakley
2022-10-22 22:25 ` [PATCH v2 0/3] Add some Glossary of terms information Philip Oakley
2022-10-22 22:25   ` [PATCH v2 1/3] doc: use 'object database' not ODB or abbreviation Philip Oakley
2022-10-22 22:25   ` [PATCH v2 2/3] glossary: add "commit graph" description Philip Oakley
2022-10-25 12:31     ` Derrick Stolee
2022-10-29 16:32       ` Philip Oakley
2022-10-22 22:25   ` [PATCH v2 3/3] glossary: add reachability bitmap description Philip Oakley
2022-10-24  7:43     ` Abhradeep Chakraborty
2022-10-24 16:39       ` Junio C Hamano
2022-10-24 21:23         ` Philip Oakley
2022-10-25 12:34           ` Derrick Stolee
2022-10-25 15:53             ` Junio C Hamano
2022-10-29 16:36             ` Philip Oakley
2022-10-23  1:49   ` [PATCH v2 0/3] Add some Glossary of terms information Junio C Hamano
2022-10-29 16:41   ` [PATCH v3 0/4] " Philip Oakley
2022-10-29 16:41     ` [PATCH v3 1/4] doc: use 'object database' not ODB or abbreviation Philip Oakley
2022-10-29 16:41     ` [PATCH v3 2/4] glossary: add "commit graph" description Philip Oakley
2022-10-29 16:41     ` [PATCH v3 3/4] glossary: add reachability bitmap description Philip Oakley
2022-10-29 16:41     ` [PATCH v3 4/4] doc: use "commit-graph" hyphenation consistently Philip Oakley
2022-10-29 17:24     ` [PATCH v3 0/4] Add some Glossary of terms information Taylor Blau
2022-10-29 17:34       ` Philip Oakley

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=e45c4fc1-3a30-726c-51f3-00caeca0a552@iee.email \
    --to=philipoakley@iee.email \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=gitster@pobox.com \
    /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).