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>
maint
Martin Ågren 2019-09-07 16:12:49 +02:00 committed by Junio C Hamano
parent 922a2c93f5
commit 1925fe0c8a
4 changed files with 75 additions and 68 deletions

View File

@ -178,6 +178,7 @@ to either specify only the realpath version, or both versions.
Example
~~~~~~~

----
# Core variables
[core]
; Don't trust file modes
@ -219,6 +220,7 @@ Example
; 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

View File

@ -339,6 +339,7 @@ EXAMPLES

Given a .git/config like this:

------------
#
# This is the config file, and
# a '#' or ';' character indicates
@ -366,6 +367,7 @@ Given a .git/config like this:
[http "https://weak.example.com"]
sslVerify = false
cookieFile = /tmp/cookie.txt
------------

you can set the filemode to true with


View 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
----

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

View File

@ -105,6 +105,7 @@ EXAMPLES

Consider the following .gitmodules file:

----
[submodule "libfoo"]
path = include/foo
url = git://foo.com/git/lib.git
@ -112,7 +113,7 @@ Consider the following .gitmodules file:
[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