threads / patch / 46786

patchdoc: camelCase the config variables to improve readability

Subject: [PATCH] doc: camelCase the config variables to improve readability

## tl;dr

7 messages between Sep 19, 2017 and Sep 25, 2017. Diffs are folded; open one to read it.

replies: 6people: 3as markdown or json

Kaartic Sivaraam· Sep 19, 2017, 12:46 UTC · lore

The config variable used weren't readable as they were in the crude form of how git stores/uses it's config variables.

Improve it's readability by replacing them with camelCased versions of config variables as it doesn't have any impact on it's usage.

Signed-off-by: Kaartic Sivaraam <kaarticsivaraam91196@gmail.com>
---
 Documentation/git-branch.txt | 4 ++--
 Documentation/git-tag.txt    | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
Show changes to 2 files +3 −4

Documentation/git-branch.txt, Documentation/git-tag.txt

diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt
index e292737b9c5ab..58f1e5c9c74e1 100644
--- a/Documentation/git-branch.txt
+++ b/Documentation/git-branch.txt
@@ -92,10 +92,10 @@ OPTIONS
 	all changes made to the branch ref, enabling use of date
 	based sha1 expressions such as "<branchname>@\{yesterday}".
 	Note that in non-bare repositories, reflogs are usually
-	enabled by default by the `core.logallrefupdates` config option.
+	enabled by default by the `core.logAllRefUpdates` config option.
 	The negated form `--no-create-reflog` only overrides an earlier
 	`--create-reflog`, but currently does not negate the setting of
-	`core.logallrefupdates`.
+	`core.logAllRefUpdates`.
 
 -f::
 --force::
diff --git a/Documentation/git-tag.txt b/Documentation/git-tag.txt
index 543fb425ee7c1..95e9f391d88fc 100644
--- a/Documentation/git-tag.txt
+++ b/Documentation/git-tag.txt
@@ -174,7 +174,7 @@ This option is only applicable when listing tags without annotation lines.
 	`core.logAllRefUpdates` in linkgit:git-config[1].
 	The negated form `--no-create-reflog` only overrides an earlier
 	`--create-reflog`, but currently does not negate the setting of
-	`core.logallrefupdates`.
+	`core.logAllRefUpdates`.
 
 <tagname>::
 	The name of the tag to create, delete, or describe.

--
https://github.com/git/git/pull/407
Jonathan Nieder· Sep 19, 2017, 20:22 UTC · re: Kaartic Sivaraam · lore

Re: [PATCH] doc: camelCase the config variables to improve readability

Hi,
Kaartic Sivaraam wrote:
> The config variable used weren't readable as they were in the
> crude form of how git stores/uses it's config variables.

nit: Git's commit messages describe the current behavior of Git in the present tense. Something like:

	These manpages' references to config variables are hard to read because
	they use all-lowercase names, without indicating where each word ends
	and begins in the configuration variable names.
	Improve readability by using camelCase instead.  Git treats these names
	case-insensitively so this does not affect functionality.
> Improve it's readability by replacing them with camelCased versions
> of config variables as it doesn't have any impact on it's usage.
nit: s/it's/its/ (in both places)
Show 5 quoted lines
> Signed-off-by: Kaartic Sivaraam <kaarticsivaraam91196@gmail.com>
> ---
>  Documentation/git-branch.txt | 4 ++--
>  Documentation/git-tag.txt    | 2 +-
>  2 files changed, 3 insertions(+), 3 deletions(-)
This also is just more consistent with the rest of the docs.
FWIW, with or without the commit message tweaks mentioned above,
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Thanks for your attention to detail.
Kaartic Sivaraam· Sep 20, 2017, 08:03 UTC · re: Jonathan Nieder · lore

Re: [PATCH] doc: camelCase the config variables to improve readability

On Wednesday 20 September 2017 01:52 AM, Jonathan Nieder wrote:
> nit: Git's commit messages describe the current behavior of Git in the
> present tense.  Something like:

Thanks for the clarification. I was once searching Documentation/SubmittingPatches to see if there is any guideline about the tense to use. Unfortunately, this seems to be an undocumented guideline. Fixed it.

My little nit: I don't think this is really the a "current behaviour of *Git*". It's just a document, you see ;-)

Show 6 quoted lines
> 	These manpages' references to config variables are hard to read because
> 	they use all-lowercase names, without indicating where each word ends
> 	and begins in the configuration variable names.
>
> 	Improve readability by using camelCase instead.  Git treats these names
> 	case-insensitively so this does not affect functionality.
Thanks for providing the solution, also. Used it with a little tweak.
> This also is just more consistent with the rest of the docs.
Yes.
> FWIW, with or without the commit message tweaks mentioned above,
> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Thanks.
> Thanks for your attention to detail.

You're welcome. Just for the note, I sent this because I had a hard time finding the words that made up those config variable names when reading that part of the 'git branch' documentation. I thought I could help a little in improving it.

--- Kaartic

Kaartic Sivaraam· Sep 23, 2017, 04:56 UTC · re: Jonathan Nieder · lore

[PATCH v2] doc: camelCase the config variables to improve readability

A few configuration variable names of Git are composite words. References to such variables in manpages are hard to read because they use all-lowercase names, without indicating where each word ends and begins.

Improve its readability by using camelCase instead. Git treats these names case-insensitively so this does not affect functionality. This also ensures consistency with other parts of the docs that use camelCase fo refer to configuration variable names.

Signed-off-by: Kaartic Sivaraam <kaarticsivaraam91196@gmail.com>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
---
 Triple checked the 'In-reply-to' Mail-Id this time ;-)
 Documentation/git-branch.txt | 4 ++--
 Documentation/git-tag.txt    | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
Show changes to 2 files +3 −3

Documentation/git-branch.txt, Documentation/git-tag.txt

diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt
index e292737b9..58f1e5c9c 100644
--- a/Documentation/git-branch.txt
+++ b/Documentation/git-branch.txt
@@ -92,10 +92,10 @@ OPTIONS
 	all changes made to the branch ref, enabling use of date
 	based sha1 expressions such as "<branchname>@\{yesterday}".
 	Note that in non-bare repositories, reflogs are usually
-	enabled by default by the `core.logallrefupdates` config option.
+	enabled by default by the `core.logAllRefUpdates` config option.
 	The negated form `--no-create-reflog` only overrides an earlier
 	`--create-reflog`, but currently does not negate the setting of
-	`core.logallrefupdates`.
+	`core.logAllRefUpdates`.
 
 -f::
 --force::
diff --git a/Documentation/git-tag.txt b/Documentation/git-tag.txt
index 543fb425e..95e9f391d 100644
--- a/Documentation/git-tag.txt
+++ b/Documentation/git-tag.txt
@@ -174,7 +174,7 @@ This option is only applicable when listing tags without annotation lines.
 	`core.logAllRefUpdates` in linkgit:git-config[1].
 	The negated form `--no-create-reflog` only overrides an earlier
 	`--create-reflog`, but currently does not negate the setting of
-	`core.logallrefupdates`.
+	`core.logAllRefUpdates`.
 
 <tagname>::
 	The name of the tag to create, delete, or describe.
-- 
2.14.1.868.g66c78774b
Junio C Hamano· Sep 24, 2017, 00:28 UTC · re: Kaartic Sivaraam · lore

Re: [PATCH v2] doc: camelCase the config variables to improve readability

Kaartic Sivaraam <kaarticsivaraam91196@gmail.com> writes:
Show 8 quoted lines
> A few configuration variable names of Git are composite words. References
> to such variables in manpages are hard to read because they use all-lowercase
> names, without indicating where each word ends and begins.
>
> Improve its readability by using camelCase instead.  Git treats these
> names case-insensitively so this does not affect functionality. This
> also ensures consistency with other parts of the docs that use camelCase
> fo refer to configuration variable names.
s/fo/to/ (or s/fo/in order to/)?  

I think the one I have on 'pu' uses Jonathan's suggested rewrite of the log message verbatim, and I suspect that it is already clear enough, even though I admit that I stuttered a bit while reading its first sentence.

I'd avoid "A few" above, as it is my impression that we use multi-word names quite a bit, not just a few.

Perhaps
	References to multi-word configuration variable names in our
	documentation must consistently use camelCase to highlight
	where the word boundaries are, even though these are treated
	case insensitively.
	Fix a few places that spell them in all lowercase, which
	makes them harder to read.

may be a more succinct way to say the same thing. We state the rule upfront, explain what the rule is for, and tell the codebase to apply the rule. That should cover everything your version and Jonathan's version wanted to convey, I'd think.

Kaartic Sivaraam· Sep 24, 2017, 05:21 UTC · re: Junio C Hamano · lore

Re: [PATCH v2] doc: camelCase the config variables to improve readability

On Sun, 2017-09-24 at 09:28 +0900, Junio C Hamano wrote:
Show 13 quoted lines
> Kaartic Sivaraam <kaarticsivaraam91196@gmail.com> writes:
> 
> > A few configuration variable names of Git are composite words. References
> > to such variables in manpages are hard to read because they use all-lowercase
> > names, without indicating where each word ends and begins.
> > 
> > Improve its readability by using camelCase instead.  Git treats these
> > names case-insensitively so this does not affect functionality. This
> > also ensures consistency with other parts of the docs that use camelCase
> > fo refer to configuration variable names.
> 
> s/fo/to/ (or s/fo/in order to/)?  
> 
Yeah, a typo that I missed.
Show 15 quoted lines
> Perhaps
> 
> 	References to multi-word configuration variable names in our
> 	documentation must consistently use camelCase to highlight
> 	where the word boundaries are, even though these are treated
> 	case insensitively.
> 
> 	Fix a few places that spell them in all lowercase, which
> 	makes them harder to read.
> 
> may be a more succinct way to say the same thing.  We state the rule
> upfront, explain what the rule is for, and tell the codebase to
> apply the rule.  That should cover everything your version and
> Jonathan's version wanted to convey, I'd think.
> 
Much better, thanks. Will resend with this updated message.

--- Kaartic

Kaartic Sivaraam· Sep 25, 2017, 08:27 UTC · re: Junio C Hamano · lore

[PATCH v3] doc: camelCase the config variables to improve readability

References to multi-word configuration variable names in our documentation must consistently use camelCase to highlight where the word boundaries are, even though these are treated case insensitively.

Fix a few places that spell them in all lowercase, which makes them harder to read.

Signed-off-by: Kaartic Sivaraam <kaarticsivaraam91196@gmail.com>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
---
 Changes in v3:
    - Used the commit message as suggested by Junio
 Documentation/git-branch.txt | 4 ++--
 Documentation/git-tag.txt    | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
Show changes to 2 files +3 −3

Documentation/git-branch.txt, Documentation/git-tag.txt

diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt
index e292737b9..58f1e5c9c 100644
--- a/Documentation/git-branch.txt
+++ b/Documentation/git-branch.txt
@@ -92,10 +92,10 @@ OPTIONS
 	all changes made to the branch ref, enabling use of date
 	based sha1 expressions such as "<branchname>@\{yesterday}".
 	Note that in non-bare repositories, reflogs are usually
-	enabled by default by the `core.logallrefupdates` config option.
+	enabled by default by the `core.logAllRefUpdates` config option.
 	The negated form `--no-create-reflog` only overrides an earlier
 	`--create-reflog`, but currently does not negate the setting of
-	`core.logallrefupdates`.
+	`core.logAllRefUpdates`.
 
 -f::
 --force::
diff --git a/Documentation/git-tag.txt b/Documentation/git-tag.txt
index 543fb425e..95e9f391d 100644
--- a/Documentation/git-tag.txt
+++ b/Documentation/git-tag.txt
@@ -174,7 +174,7 @@ This option is only applicable when listing tags without annotation lines.
 	`core.logAllRefUpdates` in linkgit:git-config[1].
 	The negated form `--no-create-reflog` only overrides an earlier
 	`--create-reflog`, but currently does not negate the setting of
-	`core.logallrefupdates`.
+	`core.logAllRefUpdates`.
 
 <tagname>::
 	The name of the tag to create, delete, or describe.
-- 
2.14.1.539.g78797280a.dirty

← back to recent threads