diff mbox series

[v3,10/10] init doc: --shared=0xxx does not give umask but perm bits

Message ID 20211106184858.11500-11-jn.avila@free.fr (mailing list archive)
State New, archived
Headers show
Series doc: fix grammar rules in commands' syntax | expand

Commit Message

Jean-Noël Avila Nov. 6, 2021, 6:48 p.m. UTC
From: Junio C Hamano <gitster@pobox.com>

The description that 0640 makes sure that the group members can read
the repository is correct, but calling that octal number a <umask>
is wrong.  Let's call it <perm>, as the value is used to set the
permission bits.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 Documentation/git-init.txt | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

Comments

Johannes Altmanninger Nov. 7, 2021, 1:22 p.m. UTC | #1
On Sat, Nov 06, 2021 at 07:48:58PM +0100, Jean-Noël Avila wrote:
> From: Junio C Hamano <gitster@pobox.com>
> 
> The description that 0640 makes sure that the group members can read
> the repository is correct, but calling that octal number a <umask>
> is wrong.  Let's call it <perm>, as the value is used to set the
> permission bits.
> 
> Signed-off-by: Junio C Hamano <gitster@pobox.com>
> ---
>  Documentation/git-init.txt | 11 ++++++-----
>  1 file changed, 6 insertions(+), 5 deletions(-)
> 
> diff --git a/Documentation/git-init.txt b/Documentation/git-init.txt
> index af0d2ee182..42268ada22 100644
> --- a/Documentation/git-init.txt
> +++ b/Documentation/git-init.txt
> @@ -79,7 +79,7 @@ repository.  If not specified, fall back to the default name (currently
>  `master`, but this is subject to change in the future; the name can be
>  customized via the `init.defaultBranch` configuration variable).
>  
> ---shared[=(false|true|umask|group|all|world|everybody|<umask>)]::
> +--shared[=(false|true|umask|group|all|world|everybody|<perm>)]::
>  
>  Specify that the Git repository is to be shared amongst several users.  This
>  allows users belonging to the same group to push into that
> @@ -110,15 +110,16 @@ the repository permissions.
>  
>  Same as 'group', but make the repository readable by all users.
>  
> -'<umask>'::
> +'<perm>'::
>  
> -'<umask>' is an 3-digit octal number prefixed with `0` and each file
> -will have mode '<umask>'. '<umask>' will override users' umask(2)
> +'<perm>' is an 3-digit octal number prefixed with `0` and each file
> +will have mode '<perm>'. '<perm>' will override users' umask(2)
>  value (and not only loosen permissions as 'group' and 'all'
>  does). '0640' will create a repository which is group-readable, but
>  not group-writable or accessible to others. '0660' will create a repo
>  that is readable and writable to the current user and group, but
> -inaccessible to others.
> +inaccessible to others (directories and executable files get their
> +`x` bit from the `r` bit for corresponding classes of uses).

This confused me until I realized that "classes of uses" should be "classes of users".

Other than that the whole series looks great.
Junio C Hamano Nov. 9, 2021, 5:32 p.m. UTC | #2
Johannes Altmanninger <aclopte@gmail.com> writes:

>> -inaccessible to others.
>> +inaccessible to others (directories and executable files get their
>> +`x` bit from the `r` bit for corresponding classes of uses).
>
> This confused me until I realized that "classes of uses" should be "classes of users".
>
> Other than that the whole series looks great.

You spotted two typos, if I count correctly?  I didn't see anything
questionable in the rest, so let me queue the patches with your
typofixes.

Thanks, both.
diff mbox series

Patch

diff --git a/Documentation/git-init.txt b/Documentation/git-init.txt
index af0d2ee182..42268ada22 100644
--- a/Documentation/git-init.txt
+++ b/Documentation/git-init.txt
@@ -79,7 +79,7 @@  repository.  If not specified, fall back to the default name (currently
 `master`, but this is subject to change in the future; the name can be
 customized via the `init.defaultBranch` configuration variable).
 
---shared[=(false|true|umask|group|all|world|everybody|<umask>)]::
+--shared[=(false|true|umask|group|all|world|everybody|<perm>)]::
 
 Specify that the Git repository is to be shared amongst several users.  This
 allows users belonging to the same group to push into that
@@ -110,15 +110,16 @@  the repository permissions.
 
 Same as 'group', but make the repository readable by all users.
 
-'<umask>'::
+'<perm>'::
 
-'<umask>' is an 3-digit octal number prefixed with `0` and each file
-will have mode '<umask>'. '<umask>' will override users' umask(2)
+'<perm>' is an 3-digit octal number prefixed with `0` and each file
+will have mode '<perm>'. '<perm>' will override users' umask(2)
 value (and not only loosen permissions as 'group' and 'all'
 does). '0640' will create a repository which is group-readable, but
 not group-writable or accessible to others. '0660' will create a repo
 that is readable and writable to the current user and group, but
-inaccessible to others.
+inaccessible to others (directories and executable files get their
+`x` bit from the `r` bit for corresponding classes of uses).
 --
 
 By default, the configuration flag `receive.denyNonFastForwards` is enabled