Re: [PATCH v2] i18n.txt: camel case and monospace "i18n.commitEncoding"

5 messages, 1 author, 2021-02-24 · open the first message on its own page

Re: [PATCH v2] i18n.txt: camel case and monospace "i18n.commitEncoding"

From: Junio C Hamano <hidden>
Date: 2021-02-23 19:42:11

Eric Sunshine [off-list ref] writes:
On Tue, Feb 23, 2021 at 2:28 PM Junio C Hamano [off-list ref] wrote:
quoted
In 95791be750 (doc: camelCase the i18n config variables to improve
readability, 2017-07-17), the other i18n config variables were
camel cased. However, this one instance was missed.

Camel case and monospace "i18n.commitEncoding" so that it matches the
surrounding text.

Signed-off-by: Denton Liu <redacted>
[jc: fixed 3 other mistakes that are exactly the same]
Signed-off-by: Junio C Hamano <redacted>
---
 * So, while I still remember, I amended your commit and queued
   this.
Denton's authorship seems to have been lost (no From: header). Was
that intentional?
I didn't even notice.

I actually expect that Denton will produce a more complete series
based on the "comm -3" output, so that this patch itself (or its
authorship) won't matter ;-)

And I also expect that somebody will take the "two greps and comm"
trick I showed and wrap it into some form of doc-lint.  Hint, hint...

Thanks.

[PATCH v3 0/3] doc: spell configuration variable names in camelCase

From: Junio C Hamano <hidden>
Date: 2021-02-24 20:27:33

I said in the first review on Denton's patch

    This obviously does not have to be part of this miniseries, but I
    wonder if we should have a list of all the configuration variables
    in one place that we can use to record the canonical spelling of
    these variables.  As

    $ git grep -h -E -i \
	    -e '^[a-z][-a-z0-9]*\.[a-z][-a-z0-9]*::' \
	    -e '^[a-z][-a-z0-9]*\.(\*|<?[a-z][-a-z0-9]*>?)\.(\*|<?[a-z][-a-z0-9]*>?)::' \
	    Documentation/config

    gives many hits with camelCased names, it might be a good place to
    start.

    Pretending that the above gives a good "canonical list" (it does not
    yet, if you look at the hits), I got curious how far we can go.

    Massaging the output from the above into config-variables.lst

    $ ... above command ... |
      sed -e 's/::$//' |
      sort -u >config-variables.lst

    and then to extract use of these tokens in the main part of the
    documentation like this:

    $ git grep -h -o -i -F -f config-variables.lst -- \
      Documentation/ ':!Documentation/RelNotes/' |
      sort -u >config-usage.lst

    gives us something we can compare with the "canonical" usage list.

    $ comm -3 config-usage.lst config-variables.lst
    blame.blankboundary
    core.excludesfile
    core.filemode
    core.gitproxy
    core.ignorestat
    core.logallrefupdates
    core.repositoryformatversion
    core.trustCtime
    http.sslverify
    http.sslversion
    i18n.commitencoding
    push.pushoption
    remote.<name>.partialCloneFilter
    remote.pushdefault
    repack.UseDeltaBaseOffset
    sendemail.aliasesfile
    showbranch.default
    transfer.hiderefs
    uploadArchive.allowUnreachable

    Some of them may be false hits, some may be showing that the copy in
    Documentation/config/ are spelled in all lowercase, but the majority
    of the hits above seem to be genuine errors similar to what you fixed
    in your patch.

    Thanks.

and as I identified a handful of low hanging fruits that way, here
are a few patches on top of his patch that started the whole thing.

I think we should make sure Documentation/config/*.txt 

 - spells all the configuration variables in the way we want to see
   them, and

 - covers all the configuration variables.

before we can proceed with more low hanging fruits with confidence,
as I do think the coverage is very good, but I know it is not 100%,
and the eventual goal should be to make sure we can teach lint-docs
to catch these before the reviewers even see them.


Denton Liu (1):
  i18n.txt: camel case and monospace "i18n.commitEncoding"

Junio C Hamano (2):
  blame-options.txt: camelcase blame.blankBoundary
  index-format doc: camelCase core.excludesFile

 Documentation/blame-options.txt          | 2 +-
 Documentation/git-am.txt                 | 2 +-
 Documentation/git-mailinfo.txt           | 4 ++--
 Documentation/i18n.txt                   | 2 +-
 Documentation/technical/index-format.txt | 4 ++--
 5 files changed, 7 insertions(+), 7 deletions(-)

-- 
2.30.1-826-g07a034c5ea

[PATCH v3 1/3] i18n.txt: camel case and monospace "i18n.commitEncoding"

From: Junio C Hamano <hidden>
Date: 2021-02-24 20:27:35

From: Denton Liu <redacted>

In 95791be750 (doc: camelCase the i18n config variables to improve
readability, 2017-07-17), the other i18n config variables were
camel cased. However, this one instance was missed.

Camel case and monospace "i18n.commitEncoding" so that it matches the
surrounding text.

Signed-off-by: Denton Liu <redacted>
[jc: fixed 3 other mistakes that are exactly the same]
Signed-off-by: Junio C Hamano <redacted>
---
 Documentation/git-am.txt       | 2 +-
 Documentation/git-mailinfo.txt | 4 ++--
 Documentation/i18n.txt         | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/Documentation/git-am.txt b/Documentation/git-am.txt
index 06bc063542..decd8ae122 100644
--- a/Documentation/git-am.txt
+++ b/Documentation/git-am.txt
@@ -79,7 +79,7 @@ OPTIONS
 	Pass `-u` flag to 'git mailinfo' (see linkgit:git-mailinfo[1]).
 	The proposed commit log message taken from the e-mail
 	is re-coded into UTF-8 encoding (configuration variable
-	`i18n.commitencoding` can be used to specify project's
+	`i18n.commitEncoding` can be used to specify project's
 	preferred encoding if it is not UTF-8).
 +
 This was optional in prior versions of git, but now it is the
diff --git a/Documentation/git-mailinfo.txt b/Documentation/git-mailinfo.txt
index 7a6aed0e30..d343f040f5 100644
--- a/Documentation/git-mailinfo.txt
+++ b/Documentation/git-mailinfo.txt
@@ -53,7 +53,7 @@ character.
 	The commit log message, author name and author email are
 	taken from the e-mail, and after minimally decoding MIME
 	transfer encoding, re-coded in the charset specified by
-	i18n.commitencoding (defaulting to UTF-8) by transliterating
+	`i18n.commitEncoding` (defaulting to UTF-8) by transliterating
 	them.  This used to be optional but now it is the default.
 +
 Note that the patch is always used as-is without charset
@@ -61,7 +61,7 @@ conversion, even with this flag.
 
 --encoding=<encoding>::
 	Similar to -u.  But when re-coding, the charset specified here is
-	used instead of the one specified by i18n.commitencoding or UTF-8.
+	used instead of the one specified by `i18n.commitEncoding` or UTF-8.
 
 -n::
 	Disable all charset re-coding of the metadata.
diff --git a/Documentation/i18n.txt b/Documentation/i18n.txt
index 7e36e5b55b..6c6baeeeb7 100644
--- a/Documentation/i18n.txt
+++ b/Documentation/i18n.txt
@@ -38,7 +38,7 @@ mind.
   a warning if the commit log message given to it does not look
   like a valid UTF-8 string, unless you explicitly say your
   project uses a legacy encoding.  The way to say this is to
-  have i18n.commitencoding in `.git/config` file, like this:
+  have `i18n.commitEncoding` in `.git/config` file, like this:
 +
 ------------
 [i18n]
-- 
2.30.1-826-g07a034c5ea

[PATCH v3 2/3] blame-options.txt: camelcase blame.blankBoundary

From: Junio C Hamano <hidden>
Date: 2021-02-24 20:27:44

All other references to blame.* configuration variables are
camelCased already.  Update this one to match.

Signed-off-by: Junio C Hamano <redacted>
---
 Documentation/blame-options.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/blame-options.txt b/Documentation/blame-options.txt
index dc3bceb6d1..117f4cf806 100644
--- a/Documentation/blame-options.txt
+++ b/Documentation/blame-options.txt
@@ -1,6 +1,6 @@
 -b::
 	Show blank SHA-1 for boundary commits.  This can also
-	be controlled via the `blame.blankboundary` config option.
+	be controlled via the `blame.blankBoundary` config option.
 
 --root::
 	Do not treat root commits as boundaries.  This can also be
-- 
2.30.1-826-g07a034c5ea

[PATCH v3 3/3] index-format doc: camelCase core.excludesFile

From: Junio C Hamano <hidden>
Date: 2021-02-24 20:27:48

Signed-off-by: Junio C Hamano <redacted>
---
 Documentation/technical/index-format.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Documentation/technical/index-format.txt b/Documentation/technical/index-format.txt
index 69edf46c03..8af608055f 100644
--- a/Documentation/technical/index-format.txt
+++ b/Documentation/technical/index-format.txt
@@ -251,14 +251,14 @@ Git index format
   - Stat data of $GIT_DIR/info/exclude. See "Index entry" section from
     ctime field until "file size".
 
-  - Stat data of core.excludesfile
+  - Stat data of core.excludesFile
 
   - 32-bit dir_flags (see struct dir_struct)
 
   - Hash of $GIT_DIR/info/exclude. A null hash means the file
     does not exist.
 
-  - Hash of core.excludesfile. A null hash means the file does
+  - Hash of core.excludesFile. A null hash means the file does
     not exist.
 
   - NUL-terminated string of per-dir exclude file name. This usually
-- 
2.30.1-826-g07a034c5ea
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help