]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Documentation: wrap config listings in "----"
authorMartin Ågren <martin.agren@gmail.com>
Sat, 7 Sep 2019 14:12:49 +0000 (16:12 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 9 Sep 2019 18:05:51 +0000 (11:05 -0700)
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>
Documentation/config.txt
Documentation/git-config.txt
Documentation/git-send-email.txt
Documentation/gitmodules.txt

index e3f5bc3396d0c7502f16eed989220c8e2010bcc1..a2dd87e2287f7fce8289aa4d7d2154f68553773b 100644 (file)
@@ -178,47 +178,49 @@ to either specify only the realpath version, or both versions.
 Example
 ~~~~~~~
 
-       # Core variables
-       [core]
-               ; Don't trust file modes
-               filemode = false
-
-       # Our diff algorithm
-       [diff]
-               external = /usr/local/bin/diff-wrapper
-               renames = true
-
-       [branch "devel"]
-               remote = origin
-               merge = refs/heads/devel
-
-       # Proxy settings
-       [core]
-               gitProxy="ssh" for "kernel.org"
-               gitProxy=default-proxy ; for the rest
-
-       [include]
-               path = /path/to/foo.inc ; include by absolute path
-               path = foo.inc ; find "foo.inc" relative to the current file
-               path = ~/foo.inc ; find "foo.inc" in your `$HOME` directory
-
-       ; include if $GIT_DIR is /path/to/foo/.git
-       [includeIf "gitdir:/path/to/foo/.git"]
-               path = /path/to/foo.inc
-
-       ; include for all repositories inside /path/to/group
-       [includeIf "gitdir:/path/to/group/"]
-               path = /path/to/foo.inc
-
-       ; include for all repositories inside $HOME/to/group
-       [includeIf "gitdir:~/to/group/"]
-               path = /path/to/foo.inc
-
-       ; relative paths are always relative to the including
-       ; file (if the condition is true); their location is not
-       ; affected by the condition
-       [includeIf "gitdir:/path/to/group/"]
-               path = foo.inc
+----
+# Core variables
+[core]
+       ; Don't trust file modes
+       filemode = false
+
+# Our diff algorithm
+[diff]
+       external = /usr/local/bin/diff-wrapper
+       renames = true
+
+[branch "devel"]
+       remote = origin
+       merge = refs/heads/devel
+
+# Proxy settings
+[core]
+       gitProxy="ssh" for "kernel.org"
+       gitProxy=default-proxy ; for the rest
+
+[include]
+       path = /path/to/foo.inc ; include by absolute path
+       path = foo.inc ; find "foo.inc" relative to the current file
+       path = ~/foo.inc ; find "foo.inc" in your `$HOME` directory
+
+; include if $GIT_DIR is /path/to/foo/.git
+[includeIf "gitdir:/path/to/foo/.git"]
+       path = /path/to/foo.inc
+
+; include for all repositories inside /path/to/group
+[includeIf "gitdir:/path/to/group/"]
+       path = /path/to/foo.inc
+
+; include for all repositories inside $HOME/to/group
+[includeIf "gitdir:~/to/group/"]
+       path = /path/to/foo.inc
+
+; relative paths are always relative to the including
+; file (if the condition is true); their location is not
+; affected by the condition
+[includeIf "gitdir:/path/to/group/"]
+       path = foo.inc
+----
 
        ; include only if we are in a worktree where foo-branch is
        ; currently checked out
index ff9310f9588a4a13028d1d4182a056262e1079d4..899e92a1c93c1a8adec0b0830a84eccc7915b73d 100644 (file)
@@ -339,33 +339,35 @@ EXAMPLES
 
 Given a .git/config like this:
 
-       #
-       # This is the config file, and
-       # a '#' or ';' character indicates
-       # a comment
-       #
-
-       ; core variables
-       [core]
-               ; Don't trust file modes
-               filemode = false
-
-       ; Our diff algorithm
-       [diff]
-               external = /usr/local/bin/diff-wrapper
-               renames = true
-
-       ; Proxy settings
-       [core]
-               gitproxy=proxy-command for kernel.org
-               gitproxy=default-proxy ; for all the rest
-
-       ; HTTP
-       [http]
-               sslVerify
-       [http "https://weak.example.com"]
-               sslVerify = false
-               cookieFile = /tmp/cookie.txt
+------------
+#
+# This is the config file, and
+# a '#' or ';' character indicates
+# a comment
+#
+
+; core variables
+[core]
+       ; Don't trust file modes
+       filemode = false
+
+; Our diff algorithm
+[diff]
+       external = /usr/local/bin/diff-wrapper
+       renames = true
+
+; Proxy settings
+[core]
+       gitproxy=proxy-command for kernel.org
+       gitproxy=default-proxy ; for all the rest
+
+; HTTP
+[http]
+       sslVerify
+[http "https://weak.example.com"]
+       sslVerify = false
+       cookieFile = /tmp/cookie.txt
+------------
 
 you can set the filemode to true with
 
index d93e5d0f58f0602e0cd0da7bfd6ce11f49b110d6..0a69810147e451d7cac290020f009631b1da9e46 100644 (file)
@@ -486,11 +486,13 @@ Use gmail as the smtp server
 To use 'git send-email' to send your patches through the GMail SMTP server,
 edit ~/.gitconfig to specify your account settings:
 
-       [sendemail]
-               smtpEncryption = tls
-               smtpServer = smtp.gmail.com
-               smtpUser = yourname@gmail.com
-               smtpServerPort = 587
+----
+[sendemail]
+       smtpEncryption = tls
+       smtpServer = smtp.gmail.com
+       smtpUser = yourname@gmail.com
+       smtpServerPort = 587
+----
 
 If you have multifactor authentication setup on your gmail account, you will
 need to generate an app-specific password for use with 'git send-email'. Visit
index a66e95b70c363a35dc1fd5413c7063f6372b4b0a..08c7b8a722048a95864ced320c23ed0a92219b07 100644 (file)
@@ -105,14 +105,15 @@ EXAMPLES
 
 Consider the following .gitmodules file:
 
-       [submodule "libfoo"]
-               path = include/foo
-               url = git://foo.com/git/lib.git
-
-       [submodule "libbar"]
-               path = include/bar
-               url = git://bar.com/git/lib.git
+----
+[submodule "libfoo"]
+       path = include/foo
+       url = git://foo.com/git/lib.git
 
+[submodule "libbar"]
+       path = include/bar
+       url = git://bar.com/git/lib.git
+----
 
 This defines two submodules, `libfoo` and `libbar`. These are expected to
 be checked out in the paths `include/foo` and `include/bar`, and for both