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
|
||||
~~~~~~~
|
||||
|
||||
# Core variables
|
||||
[core]
|
||||
; Don't trust file modes
|
||||
filemode = false
|
||||
----
|
||||
# Core variables
|
||||
[core]
|
||||
; Don't trust file modes
|
||||
filemode = false
|
||||
|
||||
# Our diff algorithm
|
||||
[diff]
|
||||
external = /usr/local/bin/diff-wrapper
|
||||
renames = true
|
||||
# Our diff algorithm
|
||||
[diff]
|
||||
external = /usr/local/bin/diff-wrapper
|
||||
renames = true
|
||||
|
||||
[branch "devel"]
|
||||
remote = origin
|
||||
merge = refs/heads/devel
|
||||
[branch "devel"]
|
||||
remote = origin
|
||||
merge = refs/heads/devel
|
||||
|
||||
# Proxy settings
|
||||
[core]
|
||||
gitProxy="ssh" for "kernel.org"
|
||||
gitProxy=default-proxy ; for the rest
|
||||
# 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]
|
||||
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 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 /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
|
||||
; 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
|
||||
; 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
|
||||
|
@ -339,33 +339,35 @@ EXAMPLES
|
||||
|
||||
Given a .git/config like this:
|
||||
|
||||
#
|
||||
# This is the config file, and
|
||||
# a '#' or ';' character indicates
|
||||
# a comment
|
||||
#
|
||||
------------
|
||||
#
|
||||
# This is the config file, and
|
||||
# a '#' or ';' character indicates
|
||||
# a comment
|
||||
#
|
||||
|
||||
; core variables
|
||||
[core]
|
||||
; Don't trust file modes
|
||||
filemode = false
|
||||
; core variables
|
||||
[core]
|
||||
; Don't trust file modes
|
||||
filemode = false
|
||||
|
||||
; Our diff algorithm
|
||||
[diff]
|
||||
external = /usr/local/bin/diff-wrapper
|
||||
renames = true
|
||||
; 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
|
||||
; 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
|
||||
; HTTP
|
||||
[http]
|
||||
sslVerify
|
||||
[http "https://weak.example.com"]
|
||||
sslVerify = false
|
||||
cookieFile = /tmp/cookie.txt
|
||||
------------
|
||||
|
||||
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,
|
||||
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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user