Skip to content

Commit 5ff0c0e

Browse files
artagnongitster
authored andcommitted
config doc: quote paths, fixing tilde-interpretation
The --global section of git-config(1) currently reads like: For writing options: write to global /.gitconfig file rather than the ^ start tilde repository .git/config, write to $XDG_CONFIG_HOME/git/config file if this file exists and the/.gitconfig file doesn’t. ^ end tilde Instead of tilde (~) being interpreted literally, asciidoc subscripts the text between the two tildes. To fix this problem, use backticks (`) to quote all the paths in the file uniformly, just like config.txt does. Signed-off-by: Ramkumar Ramachandra <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 117eea7 commit 5ff0c0e

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

Documentation/git-config.txt

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -96,29 +96,31 @@ OPTIONS
9696
names are not.
9797

9898
--global::
99-
For writing options: write to global ~/.gitconfig file rather than
100-
the repository .git/config, write to $XDG_CONFIG_HOME/git/config file
101-
if this file exists and the ~/.gitconfig file doesn't.
99+
For writing options: write to global `~/.gitconfig` file
100+
rather than the repository `.git/config`, write to
101+
`$XDG_CONFIG_HOME/git/config` file if this file exists and the
102+
`~/.gitconfig` file doesn't.
102103
+
103-
For reading options: read only from global ~/.gitconfig and from
104-
$XDG_CONFIG_HOME/git/config rather than from all available files.
104+
For reading options: read only from global `~/.gitconfig` and from
105+
`$XDG_CONFIG_HOME/git/config` rather than from all available files.
105106
+
106107
See also <<FILES>>.
107108

108109
--system::
109-
For writing options: write to system-wide $(prefix)/etc/gitconfig
110-
rather than the repository .git/config.
110+
For writing options: write to system-wide
111+
`$(prefix)/etc/gitconfig` rather than the repository
112+
`.git/config`.
111113
+
112-
For reading options: read only from system-wide $(prefix)/etc/gitconfig
114+
For reading options: read only from system-wide `$(prefix)/etc/gitconfig`
113115
rather than from all available files.
114116
+
115117
See also <<FILES>>.
116118

117119
--local::
118-
For writing options: write to the repository .git/config file.
120+
For writing options: write to the repository `.git/config` file.
119121
This is the default behavior.
120122
+
121-
For reading options: read only from the repository .git/config rather than
123+
For reading options: read only from the repository `.git/config` rather than
122124
from all available files.
123125
+
124126
See also <<FILES>>.
@@ -215,9 +217,9 @@ $GIT_DIR/config::
215217

216218
$XDG_CONFIG_HOME/git/config::
217219
Second user-specific configuration file. If $XDG_CONFIG_HOME is not set
218-
or empty, $HOME/.config/git/config will be used. Any single-valued
220+
or empty, `$HOME/.config/git/config` will be used. Any single-valued
219221
variable set in this file will be overwritten by whatever is in
220-
~/.gitconfig. It is a good idea not to create this file if
222+
`~/.gitconfig`. It is a good idea not to create this file if
221223
you sometimes use older versions of Git, as support for this
222224
file was added fairly recently.
223225

0 commit comments

Comments
 (0)