Skip to content

Commit 7b39932

Browse files
jnavilagitster
authored andcommitted
doc: apply new format to git-branch man page
- Switch the synopsis to a synopsis block which automatically formats 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 applies synopsis rules to these spans. Possible values for some variables, that were mentioned in the description prose, are now made into enumerated list. Signed-off-by: Jean-Noël Avila <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent e1b81f5 commit 7b39932

File tree

2 files changed

+196
-196
lines changed

2 files changed

+196
-196
lines changed

Documentation/config/branch.adoc

Lines changed: 53 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,42 @@
1-
branch.autoSetupMerge::
2-
Tells 'git branch', 'git switch' and 'git checkout' to set up new branches
1+
`branch.autoSetupMerge`::
2+
Tells `git branch`, `git switch` and `git checkout` to set up new branches
33
so that linkgit:git-pull[1] will appropriately merge from the
44
starting point branch. Note that even if this option is not set,
55
this behavior can be chosen per-branch using the `--track`
6-
and `--no-track` options. The valid settings are: `false` -- no
7-
automatic setup is done; `true` -- automatic setup is done when the
8-
starting point is a remote-tracking branch; `always` --
9-
automatic setup is done when the starting point is either a
10-
local branch or remote-tracking branch; `inherit` -- if the starting point
11-
has a tracking configuration, it is copied to the new
12-
branch; `simple` -- automatic setup is done only when the starting point
6+
and `--no-track` options. This option defaults to `true`. The valid settings
7+
are:
8+
`false`;; no automatic setup is done
9+
`true`;; automatic setup is done when the starting point is a remote-tracking branch
10+
`always`;; automatic setup is done when the starting point is either a
11+
local branch or remote-tracking branch
12+
`inherit`;; if the starting point has a tracking configuration, it is copied to the new
13+
branch
14+
`simple`;; automatic setup is done only when the starting point
1315
is a remote-tracking branch and the new branch has the same name as the
14-
remote branch. This option defaults to true.
16+
remote branch.
1517

16-
branch.autoSetupRebase::
17-
When a new branch is created with 'git branch', 'git switch' or 'git checkout'
18+
`branch.autoSetupRebase`::
19+
When a new branch is created with `git branch`, `git switch` or `git checkout`
1820
that tracks another branch, this variable tells Git to set
19-
up pull to rebase instead of merge (see "branch.<name>.rebase").
20-
When `never`, rebase is never automatically set to true.
21-
When `local`, rebase is set to true for tracked branches of
22-
other local branches.
23-
When `remote`, rebase is set to true for tracked branches of
24-
remote-tracking branches.
25-
When `always`, rebase will be set to true for all tracking
26-
branches.
27-
See "branch.autoSetupMerge" for details on how to set up a
28-
branch to track another branch.
29-
This option defaults to never.
21+
up pull to rebase instead of merge (see `branch.<name>.rebase`).
22+
The valid settings are:
23+
`never`;; rebase is never automatically set to true.
24+
`local`;; rebase is set to true for tracked branches of other local branches.
25+
`remote`;; rebase is set to true for tracked branches of remote-tracking branches.
26+
`always`;; rebase will be set to true for all tracking branches.
3027

31-
branch.sort::
28+
+
29+
See `branch.autoSetupMerge` for details on how to set up a branch to track another branch.
30+
This option defaults to `never`.
31+
32+
`branch.sort`::
3233
This variable controls the sort ordering of branches when displayed by
33-
linkgit:git-branch[1]. Without the "--sort=<value>" option provided, the
34+
linkgit:git-branch[1]. Without the `--sort=<value>` option provided, the
3435
value of this variable will be used as the default.
3536
See linkgit:git-for-each-ref[1] field names for valid values.
3637

37-
branch.<name>.remote::
38-
When on branch <name>, it tells 'git fetch' and 'git push'
38+
`branch.<name>.remote`::
39+
When on branch _<name>_, it tells `git fetch` and `git push`
3940
which remote to fetch from or push to. The remote to push to
4041
may be overridden with `remote.pushDefault` (for all branches).
4142
The remote to push to, for the current branch, may be further
@@ -46,58 +47,58 @@ branch.<name>.remote::
4647
Additionally, `.` (a period) is the current local repository
4748
(a dot-repository), see `branch.<name>.merge`'s final note below.
4849
49-
branch.<name>.pushRemote::
50-
When on branch <name>, it overrides `branch.<name>.remote` for
50+
`branch.<name>.pushRemote`::
51+
When on branch _<name>_, it overrides `branch.<name>.remote` for
5152
pushing. It also overrides `remote.pushDefault` for pushing
52-
from branch <name>. When you pull from one place (e.g. your
53+
from branch _<name>_. When you pull from one place (e.g. your
5354
upstream) and push to another place (e.g. your own publishing
5455
repository), you would want to set `remote.pushDefault` to
5556
specify the remote to push to for all branches, and use this
5657
option to override it for a specific branch.
5758
58-
branch.<name>.merge::
59-
Defines, together with branch.<name>.remote, the upstream branch
60-
for the given branch. It tells 'git fetch'/'git pull'/'git rebase' which
61-
branch to merge and can also affect 'git push' (see push.default).
62-
When in branch <name>, it tells 'git fetch' the default
63-
refspec to be marked for merging in FETCH_HEAD. The value is
59+
`branch.<name>.merge`::
60+
Defines, together with `branch.<name>.remote`, the upstream branch
61+
for the given branch. It tells `git fetch`/`git pull`/`git rebase` which
62+
branch to merge and can also affect `git push` (see `push.default`).
63+
When in branch _<name>_, it tells `git fetch` the default
64+
refspec to be marked for merging in `FETCH_HEAD`. The value is
6465
handled like the remote part of a refspec, and must match a
6566
ref which is fetched from the remote given by
66-
"branch.<name>.remote".
67-
The merge information is used by 'git pull' (which first calls
68-
'git fetch') to lookup the default branch for merging. Without
69-
this option, 'git pull' defaults to merge the first refspec fetched.
67+
`branch.<name>.remote`.
68+
The merge information is used by `git pull` (which first calls
69+
`git fetch`) to lookup the default branch for merging. Without
70+
this option, `git pull` defaults to merge the first refspec fetched.
7071
Specify multiple values to get an octopus merge.
71-
If you wish to setup 'git pull' so that it merges into <name> from
72+
If you wish to setup `git pull` so that it merges into <name> from
7273
another branch in the local repository, you can point
7374
branch.<name>.merge to the desired branch, and use the relative path
74-
setting `.` (a period) for branch.<name>.remote.
75+
setting `.` (a period) for `branch.<name>.remote`.
7576
76-
branch.<name>.mergeOptions::
77-
Sets default options for merging into branch <name>. The syntax and
77+
`branch.<name>.mergeOptions`::
78+
Sets default options for merging into branch _<name>_. The syntax and
7879
supported options are the same as those of linkgit:git-merge[1], but
7980
option values containing whitespace characters are currently not
8081
supported.
8182
82-
branch.<name>.rebase::
83-
When true, rebase the branch <name> on top of the fetched branch,
83+
`branch.<name>.rebase`::
84+
When true, rebase the branch _<name>_ on top of the fetched branch,
8485
instead of merging the default branch from the default remote when
85-
"git pull" is run. See "pull.rebase" for doing this in a non
86+
`git pull` is run. See `pull.rebase` for doing this in a non
8687
branch-specific manner.
8788
+
88-
When `merges` (or just 'm'), pass the `--rebase-merges` option to 'git rebase'
89+
When `merges` (or just `m`), pass the `--rebase-merges` option to `git rebase`
8990
so that the local merge commits are included in the rebase (see
9091
linkgit:git-rebase[1] for details).
9192
+
92-
When the value is `interactive` (or just 'i'), the rebase is run in interactive
93+
When the value is `interactive` (or just `i`), the rebase is run in interactive
9394
mode.
9495
+
9596
*NOTE*: this is a possibly dangerous operation; do *not* use
9697
it unless you understand the implications (see linkgit:git-rebase[1]
9798
for details).
9899
99-
branch.<name>.description::
100+
`branch.<name>.description`::
100101
Branch description, can be edited with
101102
`git branch --edit-description`. Branch description is
102-
automatically added to the format-patch cover letter or
103-
request-pull summary.
103+
automatically added to the `format-patch` cover letter or
104+
`request-pull` summary.

0 commit comments

Comments
 (0)