Skip to content

Commit 13d5331

Browse files
jnavilagitster
authored andcommitted
doc: convert git-merge manpage to new style
- Switch the synopsis to a synopsis block which will automatically format placeholders in italics and keywords in monospace - Use _<placeholder>_ instead of <placeholder> in the description - Use `backticks` for keywords and more complex option descriptions. The new rendering engine will apply synopsis rules to these spans. In order to avoid breaking the format on '<<<<<<' and '>>>>>' lines by applying the synopsis rules to these spans, they are formatted using '+' signs instead of '`' signs. Signed-off-by: Jean-Noël Avila <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 3d26ec1 commit 13d5331

File tree

1 file changed

+25
-26
lines changed

1 file changed

+25
-26
lines changed

Documentation/git-merge.adoc

Lines changed: 25 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ git-merge - Join two or more development histories together
88

99
SYNOPSIS
1010
--------
11-
[verse]
12-
'git merge' [-n] [--stat] [--no-commit] [--squash] [--[no-]edit]
11+
[synopsis]
12+
git merge [-n] [--stat] [--no-commit] [--squash] [--[no-]edit]
1313
[--no-verify] [-s <strategy>] [-X <strategy-option>] [-S[<keyid>]]
1414
[--[no-]allow-unrelated-histories]
1515
[--[no-]rerere-autoupdate] [-m <msg>] [-F <file>]
1616
[--into-name <branch>] [<commit>...]
17-
'git merge' (--continue | --abort | --quit)
17+
git merge (--continue | --abort | --quit)
1818

1919
DESCRIPTION
2020
-----------
@@ -57,7 +57,7 @@ merge started (and especially if those changes were further modified
5757
after the merge was started), `git merge --abort` will in some cases be
5858
unable to reconstruct the original (pre-merge) changes. Therefore:
5959

60-
*Warning*: Running `git merge` with non-trivial uncommitted changes is
60+
WARNING: Running `git merge` with non-trivial uncommitted changes is
6161
discouraged: while possible, it may leave you in a state that is hard to
6262
back out of in the case of a conflict.
6363

@@ -67,7 +67,7 @@ OPTIONS
6767

6868
include::merge-options.adoc[]
6969

70-
-m <msg>::
70+
`-m <msg>`::
7171
Set the commit message to be used for the merge commit (in
7272
case one is created).
7373
+
@@ -78,13 +78,13 @@ The `git fmt-merge-msg` command can be
7878
used to give a good default for automated `git merge`
7979
invocations. The automated message can include the branch description.
8080

81-
--into-name <branch>::
81+
`--into-name <branch>`::
8282
Prepare the default merge message as if merging to the branch
83-
`<branch>`, instead of the name of the real branch to which
83+
_<branch>_, instead of the name of the real branch to which
8484
the merge is made.
8585

86-
-F <file>::
87-
--file=<file>::
86+
`-F <file>`::
87+
`--file=<file>`::
8888
Read the commit message to be used for the merge commit (in
8989
case one is created).
9090
+
@@ -93,12 +93,12 @@ will be appended to the specified message.
9393

9494
include::rerere-options.adoc[]
9595

96-
--overwrite-ignore::
97-
--no-overwrite-ignore::
96+
`--overwrite-ignore`::
97+
`--no-overwrite-ignore`::
9898
Silently overwrite ignored files from the merge result. This
9999
is the default behavior. Use `--no-overwrite-ignore` to abort.
100100

101-
--abort::
101+
`--abort`::
102102
Abort the current conflict resolution process, and
103103
try to reconstruct the pre-merge state. If an autostash entry is
104104
present, apply it to the worktree.
@@ -114,17 +114,17 @@ which case `git merge --abort` applies the stash entry to the worktree
114114
whereas `git reset --merge` will save the stashed changes in the stash
115115
list.
116116

117-
--quit::
117+
`--quit`::
118118
Forget about the current merge in progress. Leave the index
119119
and the working tree as-is. If `MERGE_AUTOSTASH` is present, the
120120
stash entry will be saved to the stash list.
121121

122-
--continue::
122+
`--continue`::
123123
After a `git merge` stops due to conflicts you can conclude the
124124
merge by running `git merge --continue` (see "HOW TO RESOLVE
125125
CONFLICTS" section below).
126126

127-
<commit>...::
127+
`<commit>...`::
128128
Commits, usually other branch heads, to merge into our branch.
129129
Specifying more than one commit will create a merge with
130130
more than two parents (affectionately called an Octopus merge).
@@ -152,7 +152,7 @@ To avoid recording unrelated changes in the merge commit,
152152
`git pull` and `git merge` will also abort if there are any changes
153153
registered in the index relative to the `HEAD` commit. (Special
154154
narrow exceptions to this rule may exist depending on which merge
155-
strategy is in use, but generally, the index must match HEAD.)
155+
strategy is in use, but generally, the index must match `HEAD`.)
156156

157157
If all named commits are already ancestors of `HEAD`, `git merge`
158158
will exit early with the message "Already up to date."
@@ -195,11 +195,11 @@ happens:
195195
stage 2 from `HEAD`, and stage 3 from `MERGE_HEAD` (you
196196
can inspect the stages with `git ls-files -u`). The working
197197
tree files contain the result of the merge operation; i.e. 3-way
198-
merge results with familiar conflict markers `<<<` `===` `>>>`.
198+
merge results with familiar conflict markers +<<<+ `===` +>>>+.
199199
5. A ref named `AUTO_MERGE` is written, pointing to a tree
200200
corresponding to the current content of the working tree (including
201201
conflict markers for textual conflicts). Note that this ref is only
202-
written when the 'ort' merge strategy is used (the default).
202+
written when the `ort` merge strategy is used (the default).
203203
6. No other changes are made. In particular, the local
204204
modifications you had before you started merge will stay the
205205
same and the index entries for them stay as they were,
@@ -231,7 +231,6 @@ git merge v1.2.3^0
231231
git merge --ff-only v1.2.3
232232
----
233233

234-
235234
HOW CONFLICTS ARE PRESENTED
236235
---------------------------
237236

@@ -260,7 +259,7 @@ And here is another line that is cleanly resolved or unmodified.
260259
------------
261260

262261
The area where a pair of conflicting changes happened is marked with markers
263-
`<<<<<<<`, `=======`, and `>>>>>>>`. The part before the `=======`
262+
+<<<<<<<+, `=======`, and +>>>>>>>+. The part before the `=======`
264263
is typically your side, and the part afterwards is typically their side.
265264

266265
The default format does not show what the original said in the conflicting
@@ -270,7 +269,7 @@ side wants to say it is hard and you'd prefer to go shopping, while the
270269
other side wants to claim it is easy.
271270

272271
An alternative style can be used by setting the `merge.conflictStyle`
273-
configuration variable to either "diff3" or "zdiff3". In "diff3"
272+
configuration variable to either `diff3` or `zdiff3`. In `diff3`
274273
style, the above conflict may look like this:
275274

276275
------------
@@ -290,7 +289,7 @@ Git makes conflict resolution easy.
290289
And here is another line that is cleanly resolved or unmodified.
291290
------------
292291

293-
while in "zdiff3" style, it may look like this:
292+
while in `zdiff3` style, it may look like this:
294293

295294
------------
296295
Here are lines that are either unchanged from the common
@@ -308,8 +307,8 @@ Git makes conflict resolution easy.
308307
And here is another line that is cleanly resolved or unmodified.
309308
------------
310309

311-
In addition to the `<<<<<<<`, `=======`, and `>>>>>>>` markers, it uses
312-
another `|||||||` marker that is followed by the original text. You can
310+
In addition to the +<<<<<<<+, `=======`, and +>>>>>>>+ markers, it uses
311+
another +|||||||+ marker that is followed by the original text. You can
313312
tell that the original just stated a fact, and your side simply gave in to
314313
that statement and gave up, while the other side tried to have a more
315314
positive attitude. You can sometimes come up with a better resolution by
@@ -390,8 +389,8 @@ include::merge-strategies.adoc[]
390389
CONFIGURATION
391390
-------------
392391

393-
branch.<name>.mergeOptions::
394-
Sets default options for merging into branch <name>. The syntax and
392+
`branch.<name>.mergeOptions`::
393+
Sets default options for merging into branch _<name>_. The syntax and
395394
supported options are the same as those of `git merge`, but option
396395
values containing whitespace characters are currently not supported.
397396

0 commit comments

Comments
 (0)