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