Skip to content

Commit 5f32132

Browse files
jnavilagitster
authored andcommitted
doc: convert merge options to new synopsis format
- 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. Signed-off-by: Jean-Noël Avila <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 13d5331 commit 5f32132

File tree

2 files changed

+56
-56
lines changed

2 files changed

+56
-56
lines changed

Documentation/merge-options.adoc

Lines changed: 54 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
1-
--commit::
2-
--no-commit::
1+
`--commit`::
2+
`--no-commit`::
33
Perform the merge and commit the result. This option can
4-
be used to override --no-commit.
4+
be used to override `--no-commit`.
55
ifdef::git-pull[]
66
Only useful when merging.
77
endif::git-pull[]
88
+
9-
With --no-commit perform the merge and stop just before creating
9+
With `--no-commit` perform the merge and stop just before creating
1010
a merge commit, to give the user a chance to inspect and further
1111
tweak the merge result before committing.
1212
+
1313
Note that fast-forward updates do not create a merge commit and
14-
therefore there is no way to stop those merges with --no-commit.
14+
therefore there is no way to stop those merges with `--no-commit`.
1515
Thus, if you want to ensure your branch is not changed or updated
16-
by the merge command, use --no-ff with --no-commit.
16+
by the merge command, use `--no-ff` with `--no-commit`.
1717

18-
--edit::
19-
-e::
20-
--no-edit::
18+
`--edit`::
19+
`-e`::
20+
`--no-edit`::
2121
Invoke an editor before committing successful mechanical merge to
2222
further edit the auto-generated merge message, so that the user
2323
can explain and justify the merge. The `--no-edit` option can be
@@ -35,31 +35,31 @@ they run `git merge`. To make it easier to adjust such scripts to the
3535
updated behaviour, the environment variable `GIT_MERGE_AUTOEDIT` can be
3636
set to `no` at the beginning of them.
3737

38-
--cleanup=<mode>::
38+
`--cleanup=<mode>`::
3939
This option determines how the merge message will be cleaned up before
4040
committing. See linkgit:git-commit[1] for more details. In addition, if
41-
the '<mode>' is given a value of `scissors`, scissors will be appended
41+
the _<mode>_ is given a value of `scissors`, scissors will be appended
4242
to `MERGE_MSG` before being passed on to the commit machinery in the
4343
case of a merge conflict.
4444

4545
ifdef::git-merge[]
46-
--ff::
47-
--no-ff::
48-
--ff-only::
46+
`--ff`::
47+
`--no-ff`::
48+
`--ff-only`::
4949
Specifies how a merge is handled when the merged-in history is
5050
already a descendant of the current history. `--ff` is the
5151
default unless merging an annotated (and possibly signed) tag
5252
that is not stored in its natural place in the `refs/tags/`
5353
hierarchy, in which case `--no-ff` is assumed.
5454
endif::git-merge[]
5555
ifdef::git-pull[]
56-
--ff-only::
56+
`--ff-only`::
5757
Only update to the new history if there is no divergent local
5858
history. This is the default when no method for reconciling
5959
divergent histories is provided (via the --rebase=* flags).
6060

61-
--ff::
62-
--no-ff::
61+
`--ff`::
62+
`--no-ff`::
6363
When merging rather than rebasing, specifies how a merge is
6464
handled when the merged-in history is already a descendant of
6565
the current history. If merging is requested, `--ff` is the
@@ -81,40 +81,40 @@ With `--ff-only`, resolve the merge as a fast-forward when possible.
8181
When not possible, refuse to merge and exit with a non-zero status.
8282
endif::git-merge[]
8383

84-
-S[<keyid>]::
85-
--gpg-sign[=<keyid>]::
86-
--no-gpg-sign::
87-
GPG-sign the resulting merge commit. The `keyid` argument is
84+
`-S[<key-id>]`::
85+
`--gpg-sign[=<key-id>]`::
86+
`--no-gpg-sign`::
87+
GPG-sign the resulting merge commit. The _<key-id>_ argument is
8888
optional and defaults to the committer identity; if specified,
8989
it must be stuck to the option without a space. `--no-gpg-sign`
9090
is useful to countermand both `commit.gpgSign` configuration variable,
9191
and earlier `--gpg-sign`.
9292

93-
--log[=<n>]::
94-
--no-log::
93+
`--log[=<n>]`::
94+
`--no-log`::
9595
In addition to branch names, populate the log message with
96-
one-line descriptions from at most <n> actual commits that are being
96+
one-line descriptions from at most _<n>_ actual commits that are being
9797
merged. See also linkgit:git-fmt-merge-msg[1].
9898
ifdef::git-pull[]
9999
Only useful when merging.
100100
endif::git-pull[]
101101
+
102-
With --no-log do not list one-line descriptions from the
102+
With `--no-log` do not list one-line descriptions from the
103103
actual commits being merged.
104104

105105
include::signoff-option.adoc[]
106106

107-
--stat::
108-
-n::
109-
--no-stat::
107+
`--stat`::
108+
`-n`::
109+
`--no-stat`::
110110
Show a diffstat at the end of the merge. The diffstat is also
111111
controlled by the configuration option merge.stat.
112112
+
113-
With -n or --no-stat do not show a diffstat at the end of the
113+
With `-n` or `--no-stat` do not show a diffstat at the end of the
114114
merge.
115115

116-
--squash::
117-
--no-squash::
116+
`--squash`::
117+
`--no-squash`::
118118
Produce the working tree and index state as if a real merge
119119
happened (except for the merge information), but do not actually
120120
make a commit, move the `HEAD`, or record `$GIT_DIR/MERGE_HEAD`
@@ -123,38 +123,38 @@ merge.
123123
the current branch whose effect is the same as merging another
124124
branch (or more in case of an octopus).
125125
+
126-
With --no-squash perform the merge and commit the result. This
127-
option can be used to override --squash.
126+
With `--no-squash` perform the merge and commit the result. This
127+
option can be used to override `--squash`.
128128
+
129-
With --squash, --commit is not allowed, and will fail.
129+
With `--squash`, `--commit` is not allowed, and will fail.
130130
ifdef::git-pull[]
131131
+
132132
Only useful when merging.
133133
endif::git-pull[]
134134

135-
--[no-]verify::
135+
`--[no-]verify`::
136136
By default, the pre-merge and commit-msg hooks are run.
137137
When `--no-verify` is given, these are bypassed.
138138
See also linkgit:githooks[5].
139139
ifdef::git-pull[]
140140
Only useful when merging.
141141
endif::git-pull[]
142142

143-
-s <strategy>::
144-
--strategy=<strategy>::
143+
`-s <strategy>`::
144+
`--strategy=<strategy>`::
145145
Use the given merge strategy; can be supplied more than
146146
once to specify them in the order they should be tried.
147147
If there is no `-s` option, a built-in list of strategies
148148
is used instead (`ort` when merging a single head,
149149
`octopus` otherwise).
150150

151-
-X <option>::
152-
--strategy-option=<option>::
151+
`-X <option>`::
152+
`--strategy-option=<option>`::
153153
Pass merge strategy specific option through to the merge
154154
strategy.
155155

156-
--verify-signatures::
157-
--no-verify-signatures::
156+
`--verify-signatures`::
157+
`--no-verify-signatures`::
158158
Verify that the tip commit of the side branch being merged is
159159
signed with a valid key, i.e. a key that has a valid uid: in the
160160
default trust model, this means the signing key has been signed by
@@ -165,39 +165,39 @@ ifdef::git-pull[]
165165
Only useful when merging.
166166
endif::git-pull[]
167167

168-
--summary::
169-
--no-summary::
170-
Synonyms to --stat and --no-stat; these are deprecated and will be
168+
`--summary`::
169+
`--no-summary`::
170+
Synonyms to `--stat` and `--no-stat`; these are deprecated and will be
171171
removed in the future.
172172

173173
ifndef::git-pull[]
174-
-q::
175-
--quiet::
176-
Operate quietly. Implies --no-progress.
174+
`-q`::
175+
`--quiet`::
176+
Operate quietly. Implies `--no-progress`.
177177

178-
-v::
179-
--verbose::
178+
`-v`::
179+
`--verbose`::
180180
Be verbose.
181181

182-
--progress::
183-
--no-progress::
182+
`--progress`::
183+
`--no-progress`::
184184
Turn progress on/off explicitly. If neither is specified,
185185
progress is shown if standard error is connected to a terminal.
186186
Note that not all merge strategies may support progress
187187
reporting.
188188

189189
endif::git-pull[]
190190

191-
--autostash::
192-
--no-autostash::
191+
`--autostash`::
192+
`--no-autostash`::
193193
Automatically create a temporary stash entry before the operation
194194
begins, record it in the ref `MERGE_AUTOSTASH`
195195
and apply it after the operation ends. This means
196196
that you can run the operation on a dirty worktree. However, use
197197
with care: the final stash application after a successful
198198
merge might result in non-trivial conflicts.
199199

200-
--allow-unrelated-histories::
200+
`--allow-unrelated-histories`::
201201
By default, `git merge` command refuses to merge histories
202202
that do not share a common ancestor. This option can be
203203
used to override this safety when merging histories of two

Documentation/rerere-options.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
--rerere-autoupdate::
2-
--no-rerere-autoupdate::
1+
`--rerere-autoupdate`::
2+
`--no-rerere-autoupdate`::
33
After the rerere mechanism reuses a recorded resolution on
44
the current conflict to update the files in the working
55
tree, allow it to also update the index with the result of

0 commit comments

Comments
 (0)