Skip to content

Commit b7088a5

Browse files
jnavilagitster
authored andcommitted
doc: git-init: clarify file modes in octal.
The previous explanation was mixing the format with the identity of the field. Signed-off-by: Jean-Noël Avila <jn.avila@free.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 6ae7e88 commit b7088a5

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

Documentation/git-init.txt

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ repository. If not specified, fall back to the default name (currently
7979
`master`, but this is subject to change in the future; the name can be
8080
customized via the `init.defaultBranch` configuration variable).
8181

82-
--shared[=(false|true|umask|group|all|world|everybody|0xxx)]::
82+
--shared[=(false|true|umask|group|all|world|everybody|<umask>)]::
8383

8484
Specify that the Git repository is to be shared amongst several users. This
8585
allows users belonging to the same group to push into that
@@ -110,13 +110,15 @@ the repository permissions.
110110

111111
Same as 'group', but make the repository readable by all users.
112112

113-
'0xxx'::
113+
'<umask>'::
114114

115-
'0xxx' is an octal number and each file will have mode '0xxx'. '0xxx' will
116-
override users' umask(2) value (and not only loosen permissions as 'group' and
117-
'all' does). '0640' will create a repository which is group-readable, but not
118-
group-writable or accessible to others. '0660' will create a repo that is
119-
readable and writable to the current user and group, but inaccessible to others.
115+
'<umask>' is a 3-digit octal number prefixed with `0` and each file
116+
will have mode '<umask>'. '<umask>' will override users' umask(2)
117+
value (and not only loosen permissions as 'group' and 'all'
118+
does). '0640' will create a repository which is group-readable, but
119+
not group-writable or accessible to others. '0660' will create a repo
120+
that is readable and writable to the current user and group, but
121+
inaccessible to others.
120122
--
121123

122124
By default, the configuration flag `receive.denyNonFastForwards` is enabled

0 commit comments

Comments
 (0)