Skip to content

Commit c11c154

Browse files
committed
Merge branch 'jc/conf-var-doc' into maint
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 518d1c3 + 35840a3 commit c11c154

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
@@ -413,6 +413,29 @@ Error Messages
413413
- Say what the error is first ("cannot open %s", not "%s: cannot open")
414414

415415

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

418441
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::
@@ -2297,7 +2296,7 @@ sendemail.smtpencryption::
22972296
See linkgit:git-send-email[1] for description. Note that this
22982297
setting is not subject to the 'identity' mechanism.
22992298

2300-
sendemail.smtpssl::
2299+
sendemail.smtpssl (deprecated)::
23012300
Deprecated alias for 'sendemail.smtpencryption = ssl'.
23022301

23032302
sendemail.smtpsslcertpath::
@@ -2337,7 +2336,7 @@ sendemail.validate::
23372336
sendemail.xmailer::
23382337
See linkgit:git-send-email[1] for description.
23392338

2340-
sendemail.signedoffcc::
2339+
sendemail.signedoffcc (deprecated)::
23412340
Deprecated alias for 'sendemail.signedoffbycc'.
23422341

23432342
showbranch.default::

0 commit comments

Comments
 (0)