git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: undocumented core.sharedRepository=2 set by git init --shared=world

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jul 7, 2015, 08:14 UTC
Message-ID
<b9f56a351da062698ad629d77d3752b7@www.dscho.org>
In-Reply-To
<20150706192547.GA15396@kitenet.net>
Hi Joey,
On 2015-07-06 21:25, Joey Hess wrote:
Show 10 quoted lines
> joey@darkstar:~/tmp>git init --shared=world testrepo
> Initialized empty shared Git repository in /home/joey/tmp/testrepo/.git/
> joey@darkstar:~/tmp>grep shared testrepo/.git/config 
> 	sharedrepository = 2
> 
> This magic value of 2 seems to be undocumented, as is the magic value of 1
> that's equvilant to "group".
> 
> I think it would be better to have git init put in "world" or "group" and not
> these magic values. Anyway, I suppose they ought to be documented too.
The rationale can be found here: https://github.com/git/git/blob/v2.4.5/builtin/init-db.c#L413-L418
		/* We do not spell "group" and such, so that
		 * the configuration can be read by older version
		 * of git. Note, we use octal numbers for new share modes,
		 * and compatibility values for PERM_GROUP and
		 * PERM_EVERYBODY.
		 */
I am sympathetic to your wish, of course, and I am sure that you understand why we cannot simply break other people's setups to satisfy it.

Ciao, Johannes

Previous: Torsten BögershausenNext: John Keeping
Message 3 of 6 in “undocumented core.sharedRepository=2 set by git init --shared=world”
  1. Joey HessJul 6, 2015
  2. Torsten BögershausenJul 7, 2015
  3. Johannes SchindelinJul 7, 2015
  4. John KeepingJul 7, 2015
  5. Johannes SchindelinJul 7, 2015
  6. John KeepingJul 7, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.