Skip to content

Commit 9a9c1f1

Browse files
committed
Merge branch 'jc/conf-var-doc'
Longstanding configuration variable naming rules has been added to the documentation. * jc/conf-var-doc: CodingGuidelines: describe naming rules for configuration variables config.txt: mark deprecated variables more prominently config.txt: clarify that add.ignore-errors is deprecated
2 parents 744ea70 + 35840a3 commit 9a9c1f1

File tree

2 files changed

+30
-8
lines changed

2 files changed

+30
-8
lines changed

Documentation/CodingGuidelines

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,29 @@ Error Messages
418418
- Say what the error is first ("cannot open %s", not "%s: cannot open")
419419

420420

421+
Externally Visible Names
422+
423+
- For configuration variable names, follow the existing convention:
424+
425+
. The section name indicates the affected subsystem.
426+
427+
. The subsection name, if any, indicates which of an unbounded set
428+
of things to set the value for.
429+
430+
. The variable name describes the effect of tweaking this knob.
431+
432+
The section and variable names that consist of multiple words are
433+
formed by concatenating the words without punctuations (e.g. `-`),
434+
and are broken using bumpyCaps in documentation as a hint to the
435+
reader.
436+
437+
When choosing the variable namespace, do not use variable name for
438+
specifying possibly unbounded set of things, most notably anything
439+
an end user can freely come up with (e.g. branch names). Instead,
440+
use subsection names or variable values, like the existing variable
441+
branch.<name>.description does.
442+
443+
421444
Writing Documentation:
422445

423446
Most (if not all) of the documentation pages are written in the

Documentation/config.txt

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -683,14 +683,13 @@ core.abbrev::
683683
for abbreviated object names to stay unique for sufficiently long
684684
time.
685685

686-
add.ignore-errors::
687686
add.ignoreErrors::
687+
add.ignore-errors (deprecated)::
688688
Tells 'git add' to continue adding files when some files cannot be
689689
added due to indexing errors. Equivalent to the '--ignore-errors'
690-
option of linkgit:git-add[1]. Older versions of Git accept only
691-
`add.ignore-errors`, which does not follow the usual naming
692-
convention for configuration variables. Newer versions of Git
693-
honor `add.ignoreErrors` as well.
690+
option of linkgit:git-add[1]. `add.ignore-errors` is deprecated,
691+
as it does not follow the usual naming convention for configuration
692+
variables.
694693

695694
alias.*::
696695
Command aliases for the linkgit:git[1] command wrapper - e.g.
@@ -1960,7 +1959,7 @@ pack.useBitmaps::
19601959
true. You should not generally need to turn this off unless
19611960
you are debugging pack bitmaps.
19621961

1963-
pack.writebitmaps::
1962+
pack.writebitmaps (deprecated)::
19641963
This is a deprecated synonym for `repack.writeBitmaps`.
19651964

19661965
pack.writeBitmapHashCache::
@@ -2306,7 +2305,7 @@ sendemail.smtpencryption::
23062305
See linkgit:git-send-email[1] for description. Note that this
23072306
setting is not subject to the 'identity' mechanism.
23082307

2309-
sendemail.smtpssl::
2308+
sendemail.smtpssl (deprecated)::
23102309
Deprecated alias for 'sendemail.smtpencryption = ssl'.
23112310

23122311
sendemail.smtpsslcertpath::
@@ -2346,7 +2345,7 @@ sendemail.validate::
23462345
sendemail.xmailer::
23472346
See linkgit:git-send-email[1] for description.
23482347

2349-
sendemail.signedoffcc::
2348+
sendemail.signedoffcc (deprecated)::
23502349
Deprecated alias for 'sendemail.signedoffbycc'.
23512350

23522351
showbranch.default::

0 commit comments

Comments
 (0)