doc: git-init: apply new documentation formatting guidelines

Signed-off-by: Jean-Noël Avila <jn.avila@free.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Jean-Noël Avila committed Mar 29, 2024 at 11:19 UTC 5cf7dfe93ed69b2a9c4826c1ee8bf980bd44e66b
2 files changed +30 -30
Documentation/config/init.txt
+2 -2
@@ -3,8 +3,8 @@ ifndef::git-init[]
3 :see-git-init: (See the "TEMPLATE DIRECTORY" section of linkgit:git-init[1].)
4 endif::[]
5
6 -init.templateDir::
6 +`init.templateDir`::
7 Specify the directory from which templates will be copied. {see-git-init}
8 -init.defaultBranch::
8 +`init.defaultBranch`::
9 Allows overriding the default branch name e.g. when initializing
10 a new repository.
Documentation/git-init.txt
+28 -28
@@ -9,11 +9,11 @@ git-init - Create an empty Git repository or reinitialize an existing one
9 SYNOPSIS
10 --------
11 [verse]
12 -'git init' [-q | --quiet] [--bare] [--template=<template-directory>]
13 - [--separate-git-dir <git-dir>] [--object-format=<format>]
14 - [--ref-format=<format>]
15 - [-b <branch-name> | --initial-branch=<branch-name>]
16 - [--shared[=<permissions>]] [<directory>]
12 +`git init` [`-q` | `--quiet`] [`--bare`] [++--template=++__<template-directory>__]
13 + [`--separate-git-dir` _<git-dir>_] [++--object-format=++__<format>__]
14 + [++--ref-format=++__<format>__]
15 + [`-b` _<branch-name>_ | ++--initial-branch=++__<branch-name>__]
16 + [++--shared++[++=++__<permissions>__]] [_<directory>_]
17
18
19 DESCRIPTION
@@ -41,35 +41,35 @@ the repository to another place if `--separate-git-dir` is given).
41 OPTIONS
42 -------
43
44 --q::
45 ---quiet::
44 +`-q`::
45 +`--quiet`::
46
47 Only print error and warning messages; all other output will be suppressed.
48
49 ---bare::
49 +`--bare`::
50
51 Create a bare repository. If `GIT_DIR` environment is not set, it is set to the
52 current working directory.
53
54 ---object-format=<format>::
54 +++--object-format=++__<format>__::
55
56 Specify the given object _<format>_ (hash algorithm) for the repository. The valid
57 values are `sha1` and (if enabled) `sha256`. `sha1` is the default.
58 +
59 include::object-format-disclaimer.txt[]
60
61 ---ref-format=<format>::
61 +++--ref-format=++__<format>__::
62
63 Specify the given ref storage _<format>_ for the repository. The valid values are:
64 +
65 include::ref-storage-format.txt[]
66
67 ---template=<template-directory>::
67 +++--template=++__<template-directory>__::
68
69 Specify the directory from which templates will be used. (See the "TEMPLATE
70 DIRECTORY" section below.)
71
72 ---separate-git-dir=<git-dir>::
72 +++--separate-git-dir=++__<git-dir>__::
73
74 Instead of initializing the repository as a directory to either `$GIT_DIR` or
75 `./.git/`, create a text file there containing the path to the actual
@@ -78,53 +78,53 @@ repository.
78 +
79 If this is a reinitialization, the repository will be moved to the specified path.
80
81 --b <branch-name>::
82 ---initial-branch=<branch-name>::
81 +`-b` _<branch-name>_::
82 +++--initial-branch=++__<branch-name>__::
83
84 Use _<branch-name>_ for the initial branch in the newly created
85 repository. If not specified, fall back to the default name (currently
86 `master`, but this is subject to change in the future; the name can be
87 customized via the `init.defaultBranch` configuration variable).
88
89 ---shared[=(false|true|umask|group|all|world|everybody|<perm>)]::
89 +++--shared++[++=++(`false`|`true`|`umask`|`group`|`all`|`world`|`everybody`|_<perm>_)]::
90
91 Specify that the Git repository is to be shared amongst several users. This
92 allows users belonging to the same group to push into that
93 repository. When specified, the config variable `core.sharedRepository` is
94 set so that files and directories under `$GIT_DIR` are created with the
95 requested permissions. When not specified, Git will use permissions reported
96 -by `umask(2)`.
96 +by `umask`(2).
97 +
98 The option can have the following values, defaulting to `group` if no value
99 is given:
100 +
101 --
102 -umask::
103 -false::
102 +`umask`::
103 +`false`::
104
105 -Use permissions reported by umask(2). The default, when `--shared` is not
105 +Use permissions reported by `umask`(2). The default, when `--shared` is not
106 specified.
107
108 -group::
109 -true::
108 +`group`::
109 +`true`::
110
111 -Make the repository group-writable, (and g+sx, since the git group may not be
111 +Make the repository group-writable, (and `g+sx`, since the git group may not be
112 the primary group of all users). This is used to loosen the permissions of an
113 -otherwise safe umask(2) value. Note that the umask still applies to the other
113 +otherwise safe `umask`(2) value. Note that the umask still applies to the other
114 permission bits (e.g. if umask is `0022`, using `group` will not remove read
115 privileges from other (non-group) users). See `0xxx` for how to exactly specify
116 the repository permissions.
117
118 -all::
119 -world::
120 -everybody::
118 +`all`::
119 +`world`::
120 +`everybody`::
121
122 Same as `group`, but make the repository readable by all users.
123
124 -<perm>::
124 +_<perm>_::
125
126 _<perm>_ is a 3-digit octal number prefixed with `0` and each file
127 -will have mode _<perm>_. _<perm>_ will override users'`umask(2)`
127 +will have mode _<perm>_. _<perm>_ will override users' `umask`(2)
128 value (and not only loosen permissions as `group` and `all`
129 do). `0640` will create a repository which is group-readable, but
130 not group-writable or accessible to others. `0660` will create a repo