Skip to content

Commit 1925fe0

Browse files
Martin Ågrengitster
authored andcommitted
Documentation: wrap config listings in "----"
The indented lines in these example config-file listings are indented differently by AsciiDoc and Asciidoctor. Fix this by marking the example config-files as code listings by wrapping them in "----". Because this gives us some extra indentation, we can remove the one that we have been carrying explicitly. That is, drop the first tab of indentation on each line. With AsciiDoc, this results in identical rendering before and after this commit. Asciidoctor now renders this the same as AsciiDoc does. git-config.txt pretty consistently uses twelve dashes rather than the minimum four to spell "----". Let's stick to the file-local convention there. Signed-off-by: Martin Ågren <martin.agren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 922a2c9 commit 1925fe0

File tree

4 files changed

+87
-80
lines changed

4 files changed

+87
-80
lines changed

Documentation/config.txt

Lines changed: 43 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -178,47 +178,49 @@ to either specify only the realpath version, or both versions.
178178
Example
179179
~~~~~~~
180180

181-
# Core variables
182-
[core]
183-
; Don't trust file modes
184-
filemode = false
185-
186-
# Our diff algorithm
187-
[diff]
188-
external = /usr/local/bin/diff-wrapper
189-
renames = true
190-
191-
[branch "devel"]
192-
remote = origin
193-
merge = refs/heads/devel
194-
195-
# Proxy settings
196-
[core]
197-
gitProxy="ssh" for "kernel.org"
198-
gitProxy=default-proxy ; for the rest
199-
200-
[include]
201-
path = /path/to/foo.inc ; include by absolute path
202-
path = foo.inc ; find "foo.inc" relative to the current file
203-
path = ~/foo.inc ; find "foo.inc" in your `$HOME` directory
204-
205-
; include if $GIT_DIR is /path/to/foo/.git
206-
[includeIf "gitdir:/path/to/foo/.git"]
207-
path = /path/to/foo.inc
208-
209-
; include for all repositories inside /path/to/group
210-
[includeIf "gitdir:/path/to/group/"]
211-
path = /path/to/foo.inc
212-
213-
; include for all repositories inside $HOME/to/group
214-
[includeIf "gitdir:~/to/group/"]
215-
path = /path/to/foo.inc
216-
217-
; relative paths are always relative to the including
218-
; file (if the condition is true); their location is not
219-
; affected by the condition
220-
[includeIf "gitdir:/path/to/group/"]
221-
path = foo.inc
181+
----
182+
# Core variables
183+
[core]
184+
; Don't trust file modes
185+
filemode = false
186+
187+
# Our diff algorithm
188+
[diff]
189+
external = /usr/local/bin/diff-wrapper
190+
renames = true
191+
192+
[branch "devel"]
193+
remote = origin
194+
merge = refs/heads/devel
195+
196+
# Proxy settings
197+
[core]
198+
gitProxy="ssh" for "kernel.org"
199+
gitProxy=default-proxy ; for the rest
200+
201+
[include]
202+
path = /path/to/foo.inc ; include by absolute path
203+
path = foo.inc ; find "foo.inc" relative to the current file
204+
path = ~/foo.inc ; find "foo.inc" in your `$HOME` directory
205+
206+
; include if $GIT_DIR is /path/to/foo/.git
207+
[includeIf "gitdir:/path/to/foo/.git"]
208+
path = /path/to/foo.inc
209+
210+
; include for all repositories inside /path/to/group
211+
[includeIf "gitdir:/path/to/group/"]
212+
path = /path/to/foo.inc
213+
214+
; include for all repositories inside $HOME/to/group
215+
[includeIf "gitdir:~/to/group/"]
216+
path = /path/to/foo.inc
217+
218+
; relative paths are always relative to the including
219+
; file (if the condition is true); their location is not
220+
; affected by the condition
221+
[includeIf "gitdir:/path/to/group/"]
222+
path = foo.inc
223+
----
222224

223225
; include only if we are in a worktree where foo-branch is
224226
; currently checked out

Documentation/git-config.txt

Lines changed: 29 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -339,33 +339,35 @@ EXAMPLES
339339

340340
Given a .git/config like this:
341341

342-
#
343-
# This is the config file, and
344-
# a '#' or ';' character indicates
345-
# a comment
346-
#
347-
348-
; core variables
349-
[core]
350-
; Don't trust file modes
351-
filemode = false
352-
353-
; Our diff algorithm
354-
[diff]
355-
external = /usr/local/bin/diff-wrapper
356-
renames = true
357-
358-
; Proxy settings
359-
[core]
360-
gitproxy=proxy-command for kernel.org
361-
gitproxy=default-proxy ; for all the rest
362-
363-
; HTTP
364-
[http]
365-
sslVerify
366-
[http "https://weak.example.com"]
367-
sslVerify = false
368-
cookieFile = /tmp/cookie.txt
342+
------------
343+
#
344+
# This is the config file, and
345+
# a '#' or ';' character indicates
346+
# a comment
347+
#
348+
349+
; core variables
350+
[core]
351+
; Don't trust file modes
352+
filemode = false
353+
354+
; Our diff algorithm
355+
[diff]
356+
external = /usr/local/bin/diff-wrapper
357+
renames = true
358+
359+
; Proxy settings
360+
[core]
361+
gitproxy=proxy-command for kernel.org
362+
gitproxy=default-proxy ; for all the rest
363+
364+
; HTTP
365+
[http]
366+
sslVerify
367+
[http "https://weak.example.com"]
368+
sslVerify = false
369+
cookieFile = /tmp/cookie.txt
370+
------------
369371

370372
you can set the filemode to true with
371373

Documentation/git-send-email.txt

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -486,11 +486,13 @@ Use gmail as the smtp server
486486
To use 'git send-email' to send your patches through the GMail SMTP server,
487487
edit ~/.gitconfig to specify your account settings:
488488

489-
[sendemail]
490-
smtpEncryption = tls
491-
smtpServer = smtp.gmail.com
492-
smtpUser = yourname@gmail.com
493-
smtpServerPort = 587
489+
----
490+
[sendemail]
491+
smtpEncryption = tls
492+
smtpServer = smtp.gmail.com
493+
smtpUser = yourname@gmail.com
494+
smtpServerPort = 587
495+
----
494496

495497
If you have multifactor authentication setup on your gmail account, you will
496498
need to generate an app-specific password for use with 'git send-email'. Visit

Documentation/gitmodules.txt

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -105,14 +105,15 @@ EXAMPLES
105105

106106
Consider the following .gitmodules file:
107107

108-
[submodule "libfoo"]
109-
path = include/foo
110-
url = git://foo.com/git/lib.git
111-
112-
[submodule "libbar"]
113-
path = include/bar
114-
url = git://bar.com/git/lib.git
108+
----
109+
[submodule "libfoo"]
110+
path = include/foo
111+
url = git://foo.com/git/lib.git
115112

113+
[submodule "libbar"]
114+
path = include/bar
115+
url = git://bar.com/git/lib.git
116+
----
116117

117118
This defines two submodules, `libfoo` and `libbar`. These are expected to
118119
be checked out in the paths `include/foo` and `include/bar`, and for both

0 commit comments

Comments
 (0)