{"thread":{"id":"5178","subject":"[PATCH] Update git-init-db(1) and documentation of core.sharedRepository","startedAt":"2006-08-09T00:26:23Z","lastAt":"2006-08-09T00:47:18Z","messageCount":2,"participants":["Jonas Fonseca","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"25013","messageId":"20060809002623.GB10115@diku.dk","threadId":"5178","inReplyTo":null,"subject":"[PATCH] Update git-init-db(1) and documentation of core.sharedRepository","fromName":"Jonas Fonseca","fromEmail":"fonseca@diku.dk","sentAt":"2006-08-09T00:26:23Z","receivedAt":"2006-08-09T00:26:23Z","isPatch":true,"sender":{"key":"fonseca@diku.dk","avatar":"https://gravatar.com/avatar/f82f3ad698717c51873b020c750a92438c820a24056dc39fe4d07baa10a92264?d=mp&s=160"},"body":"Combine option descriptions in git-init-db(1). Reflect the changes to\nadditionally allow all users to read the created git repository.\n\nSigned-off-by: Jonas Fonseca <fonseca@diku.dk>\n---\n\nI noticed that the git-init-db(1) --template description says: \"The\ndefault template directory is `/usr/share/git-core/templates`\", which\nmakes me wonder if we should substitute these hard-coded paths when\ninstalling the man pages ...\n\n   $ sed \\\n\t-e 's#/usr/share/git-core/templates#$(template_dir)#'\n\t... etc ...\n\n... at least git-clone(1) also hard-codes this path.\n\n Documentation/config.txt      |    9 +++++--\n Documentation/git-init-db.txt |   51 ++++++++++++++++++++++++++++-------------\n 2 files changed, 41 insertions(+), 19 deletions(-)\n\ndiff --git a/Documentation/config.txt b/Documentation/config.txt\nindex d89916b..4de7d72 100644\n--- a/Documentation/config.txt\n+++ b/Documentation/config.txt\n@@ -83,9 +83,12 @@ core.repositoryFormatVersion::\n \tversion.\n \n core.sharedRepository::\n-\tIf true, the repository is made shareable between several users\n-\tin a group (making sure all the files and objects are group-writable).\n-\tSee gitlink:git-init-db[1]. False by default.\n+\tWhen 'group' (or 'true'), the repository is made shareable between\n+\tseveral users in a group (making sure all the files and objects are\n+\tgroup-writable). When 'all' (or 'world' or 'everybody'), the\n+\trepository will be readable by all users, additionally to being\n+\tgroup-shareable. When 'umask' (or 'false'), git will use permissions\n+\treported by umask(2). See gitlink:git-init-db[1]. False by default.\n \n core.warnAmbiguousRefs::\n \tIf true, git will warn you if the ref name you passed it is ambiguous\ndiff --git a/Documentation/git-init-db.txt b/Documentation/git-init-db.txt\nindex 0a4fc14..3d04096 100644\n--- a/Documentation/git-init-db.txt\n+++ b/Documentation/git-init-db.txt\n@@ -8,17 +8,47 @@ git-init-db - Creates an empty git repos\n \n SYNOPSIS\n --------\n-'git-init-db' [--template=<template_directory>] [--shared]\n+'git-init-db' [--template=<template_directory>] [--shared[=<permissions>]]\n \n \n OPTIONS\n -------\n+\n+--\n+\n --template=<template_directory>::\n-\tProvide the directory from which templates will be used.\n-\tThe default template directory is `/usr/share/git-core/templates`.\n \n---shared::\n-\tSpecify that the git repository is to be shared amongst several users.\n+Provide the directory from which templates will be used.  The default template\n+directory is `/usr/share/git-core/templates`.\n+\n+When specified, `<template_directory>` is used as the source of the template\n+files rather than the default.  The template files include some directory\n+structure, some suggested \"exclude patterns\", and copies of non-executing\n+\"hook\" files.  The suggested patterns and hook files are all modifiable and\n+extensible.\n+\n+--shared[={false|true|umask|group|all|world|everybody}]::\n+\n+Specify that the git repository is to be shared amongst several users.  This\n+allows users belonging to the same group to push into that\n+repository.  When specified, the config variable \"core.sharedRepository\" is\n+set so that files and directories under `$GIT_DIR` are created with the\n+requested permissions.  When not specified, git will use permissions reported\n+by umask(2).\n+\n+The option can have the following values, defaulting to 'group' if no value\n+is given:\n+\n+ - 'umask' (or 'false'): Use permissions reported by umask(2). The default,\n+   when `--shared` is not specified.\n+\n+ - 'group' (or 'true'): Make the repository group-writable, (and g+sx, since\n+   the git group may be not the primary group of all users).\n+\n+ - 'all' (or 'world' or 'everybody'): Same as 'group', but make the repository\n+   readable by all users.\n+\n+--\n \n \n DESCRIPTION\n@@ -29,12 +59,6 @@ template files.\n An initial `HEAD` file that references the HEAD of the master branch\n is also created.\n \n-If `--template=<template_directory>` is specified, `<template_directory>`\n-is used as the source of the template files rather than the default.\n-The template files include some directory structure, some suggested\n-\"exclude patterns\", and copies of non-executing \"hook\" files.  The\n-suggested patterns and hook files are all modifiable and extensible.\n-\n If the `$GIT_DIR` environment variable is set then it specifies a path\n to use instead of `./.git` for the base of the repository.\n \n@@ -42,11 +66,6 @@ If the object storage directory is speci\n environment variable then the sha1 directories are created underneath -\n otherwise the default `$GIT_DIR/objects` directory is used.\n \n-A shared repository allows users belonging to the same group to push into that\n-repository. When specifying `--shared` the config variable \"core.sharedRepository\" \n-is set to 'true' so that directories under `$GIT_DIR` are made group writable\n-(and g+sx, since the git group may be not the primary group of all users).\n-\n Running `git-init-db` in an existing repository is safe. It will not overwrite\n things that are already there. The primary reason for rerunning `git-init-db`\n is to pick up newly added templates.\n-- \nJonas Fonseca\n"},{"id":"25014","messageId":"7vejvqu44p.fsf@assigned-by-dhcp.cox.net","threadId":"5178","inReplyTo":"20060809002623.GB10115@diku.dk","subject":"Re: [PATCH] Update git-init-db(1) and documentation of core.sharedRepository","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-08-09T00:47:18Z","receivedAt":"2006-08-09T00:47:18Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jonas Fonseca <fonseca@diku.dk> writes:\n\n> Combine option descriptions in git-init-db(1). Reflect the changes to\n> additionally allow all users to read the created git repository.\n\nThanks.\n\n> I noticed that the git-init-db(1) --template description says: \"The\n> default template directory is `/usr/share/git-core/templates`\", which\n> makes me wonder if we should substitute these hard-coded paths when\n> installing the man pages ...\n\nWhile it would be nicer, I do not think it is worth it.  After\nall it says \"The default...\" -- if a particular installation is\nnot using the default location, I expect that the users are\nclever enough to adjust the reading of it.\n"}]}