Skip to content

Commit 314fcd3

Browse files
committed
Merge branch 'ma/asciidoctor-more-fixes'
Doc formatting updates. * ma/asciidoctor-more-fixes: gitweb.conf.txt: switch pluses to backticks to help Asciidoctor git-merge-index.txt: wrap shell listing in "----" git-receive-pack.txt: wrap shell [script] listing in "----" git-ls-remote.txt: wrap shell listing in "----" Documentation: wrap config listings in "----" git-merge-base.txt: render indentations correctly under Asciidoctor Documentation: wrap blocks with "--"
2 parents 70c1cbf + 4414e83 commit 314fcd3

11 files changed

+223
-184
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-commit.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -282,18 +282,20 @@ FROM UPSTREAM REBASE" section in linkgit:git-rebase[1].)
282282
--untracked-files[=<mode>]::
283283
Show untracked files.
284284
+
285+
--
285286
The mode parameter is optional (defaults to 'all'), and is used to
286287
specify the handling of untracked files; when -u is not used, the
287288
default is 'normal', i.e. show untracked files and directories.
288-
+
289+
289290
The possible options are:
290-
+
291+
291292
- 'no' - Show no untracked files
292293
- 'normal' - Shows untracked files and directories
293294
- 'all' - Also shows individual files in untracked directories.
294-
+
295+
295296
The default can be changed using the status.showUntrackedFiles
296297
configuration variable documented in linkgit:git-config[1].
298+
--
297299

298300
-v::
299301
--verbose::

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-ls-remote.txt

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -92,21 +92,23 @@ OPTIONS
9292
EXAMPLES
9393
--------
9494

95-
$ git ls-remote --tags ./.
96-
d6602ec5194c87b0fc87103ca4d67251c76f233a refs/tags/v0.99
97-
f25a265a342aed6041ab0cc484224d9ca54b6f41 refs/tags/v0.99.1
98-
7ceca275d047c90c0c7d5afb13ab97efdf51bd6e refs/tags/v0.99.3
99-
c5db5456ae3b0873fc659c19fafdde22313cc441 refs/tags/v0.99.2
100-
0918385dbd9656cab0d1d81ba7453d49bbc16250 refs/tags/junio-gpg-pub
101-
$ git ls-remote http://www.kernel.org/pub/scm/git/git.git master pu rc
102-
5fe978a5381f1fbad26a80e682ddd2a401966740 refs/heads/master
103-
c781a84b5204fb294c9ccc79f8b3baceeb32c061 refs/heads/pu
104-
$ git remote add korg http://www.kernel.org/pub/scm/git/git.git
105-
$ git ls-remote --tags korg v\*
106-
d6602ec5194c87b0fc87103ca4d67251c76f233a refs/tags/v0.99
107-
f25a265a342aed6041ab0cc484224d9ca54b6f41 refs/tags/v0.99.1
108-
c5db5456ae3b0873fc659c19fafdde22313cc441 refs/tags/v0.99.2
109-
7ceca275d047c90c0c7d5afb13ab97efdf51bd6e refs/tags/v0.99.3
95+
----
96+
$ git ls-remote --tags ./.
97+
d6602ec5194c87b0fc87103ca4d67251c76f233a refs/tags/v0.99
98+
f25a265a342aed6041ab0cc484224d9ca54b6f41 refs/tags/v0.99.1
99+
7ceca275d047c90c0c7d5afb13ab97efdf51bd6e refs/tags/v0.99.3
100+
c5db5456ae3b0873fc659c19fafdde22313cc441 refs/tags/v0.99.2
101+
0918385dbd9656cab0d1d81ba7453d49bbc16250 refs/tags/junio-gpg-pub
102+
$ git ls-remote http://www.kernel.org/pub/scm/git/git.git master pu rc
103+
5fe978a5381f1fbad26a80e682ddd2a401966740 refs/heads/master
104+
c781a84b5204fb294c9ccc79f8b3baceeb32c061 refs/heads/pu
105+
$ git remote add korg http://www.kernel.org/pub/scm/git/git.git
106+
$ git ls-remote --tags korg v\*
107+
d6602ec5194c87b0fc87103ca4d67251c76f233a refs/tags/v0.99
108+
f25a265a342aed6041ab0cc484224d9ca54b6f41 refs/tags/v0.99.1
109+
c5db5456ae3b0873fc659c19fafdde22313cc441 refs/tags/v0.99.2
110+
7ceca275d047c90c0c7d5afb13ab97efdf51bd6e refs/tags/v0.99.3
111+
----
110112

111113
SEE ALSO
112114
--------

Documentation/git-merge-base.txt

Lines changed: 57 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -80,31 +80,37 @@ which is reachable from both 'A' and 'B' through the parent relationship.
8080

8181
For example, with this topology:
8282

83-
o---o---o---B
84-
/
85-
---o---1---o---o---o---A
83+
....
84+
o---o---o---B
85+
/
86+
---o---1---o---o---o---A
87+
....
8688

8789
the merge base between 'A' and 'B' is '1'.
8890

8991
Given three commits 'A', 'B' and 'C', `git merge-base A B C` will compute the
9092
merge base between 'A' and a hypothetical commit 'M', which is a merge
9193
between 'B' and 'C'. For example, with this topology:
9294

93-
o---o---o---o---C
94-
/
95-
/ o---o---o---B
96-
/ /
97-
---2---1---o---o---o---A
95+
....
96+
o---o---o---o---C
97+
/
98+
/ o---o---o---B
99+
/ /
100+
---2---1---o---o---o---A
101+
....
98102

99103
the result of `git merge-base A B C` is '1'. This is because the
100104
equivalent topology with a merge commit 'M' between 'B' and 'C' is:
101105

102106

103-
o---o---o---o---o
104-
/ \
105-
/ o---o---o---o---M
106-
/ /
107-
---2---1---o---o---o---A
107+
....
108+
o---o---o---o---o
109+
/ \
110+
/ o---o---o---o---M
111+
/ /
112+
---2---1---o---o---o---A
113+
....
108114

109115
and the result of `git merge-base A M` is '1'. Commit '2' is also a
110116
common ancestor between 'A' and 'M', but '1' is a better common ancestor,
@@ -116,11 +122,13 @@ the best common ancestor of all commits.
116122
When the history involves criss-cross merges, there can be more than one
117123
'best' common ancestor for two commits. For example, with this topology:
118124

119-
---1---o---A
120-
\ /
121-
X
122-
/ \
123-
---2---o---o---B
125+
....
126+
---1---o---A
127+
\ /
128+
X
129+
/ \
130+
---2---o---o---B
131+
....
124132

125133
both '1' and '2' are merge-bases of A and B. Neither one is better than
126134
the other (both are 'best' merge bases). When the `--all` option is not given,
@@ -131,18 +139,22 @@ and B is (or at least used to be) to compute the merge base between
131139
A and B, and check if it is the same as A, in which case, A is an
132140
ancestor of B. You will see this idiom used often in older scripts.
133141

134-
A=$(git rev-parse --verify A)
135-
if test "$A" = "$(git merge-base A B)"
136-
then
137-
... A is an ancestor of B ...
138-
fi
142+
....
143+
A=$(git rev-parse --verify A)
144+
if test "$A" = "$(git merge-base A B)"
145+
then
146+
... A is an ancestor of B ...
147+
fi
148+
....
139149

140150
In modern git, you can say this in a more direct way:
141151

142-
if git merge-base --is-ancestor A B
143-
then
144-
... A is an ancestor of B ...
145-
fi
152+
....
153+
if git merge-base --is-ancestor A B
154+
then
155+
... A is an ancestor of B ...
156+
fi
157+
....
146158

147159
instead.
148160

@@ -154,13 +166,15 @@ topic origin/master`, the history of remote-tracking branch
154166
`origin/master` may have been rewound and rebuilt, leading to a
155167
history of this shape:
156168

157-
o---B2
158-
/
159-
---o---o---B1--o---o---o---B (origin/master)
160-
\
161-
B0
162-
\
163-
D0---D1---D (topic)
169+
....
170+
o---B2
171+
/
172+
---o---o---B1--o---o---o---B (origin/master)
173+
\
174+
B0
175+
\
176+
D0---D1---D (topic)
177+
....
164178

165179
where `origin/master` used to point at commits B0, B1, B2 and now it
166180
points at B, and your `topic` branch was started on top of it back
@@ -193,13 +207,15 @@ will find B0, and
193207
will replay D0, D1 and D on top of B to create a new history of this
194208
shape:
195209

196-
o---B2
197-
/
198-
---o---o---B1--o---o---o---B (origin/master)
199-
\ \
200-
B0 D0'--D1'--D' (topic - updated)
201-
\
202-
D0---D1---D (topic - old)
210+
....
211+
o---B2
212+
/
213+
---o---o---B1--o---o---o---B (origin/master)
214+
\ \
215+
B0 D0'--D1'--D' (topic - updated)
216+
\
217+
D0---D1---D (topic - old)
218+
....
203219

204220
A caveat is that older reflog entries in your repository may be
205221
expired by `git gc`. If B0 no longer appears in the reflog of the

0 commit comments

Comments
 (0)