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

Re: Behavior of core.sharedRepository on non-bare Repositories

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 17, 2022, 23:12 UTC
Message-ID
<xmqqk0eyt0s5.fsf@gitster.g>
In-Reply-To
<xmqqo84at131.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> writes:
> But allowing write access to the same repository from multiple
> working trees were considered worth supporting.  More importantly,
> the repository data access by git is not uncontrolled---there are
> protections with lockfiles to avoid overwriting others' changes.

IOW, the expected set-up is for a repository (bare or non-bare) is marked as shared, owned by the group, and each user who wants to work locally on that project sharing the repository would belong to the group. Each user has a worktree added to the repository (via "git worktree add") and it is OK (and may even be encouraged) to have their umask stricter than 022 to prevent other users in the same group from mucking with the worktree files. Since Git sets the permission bits of these shared repository files to allow access by group members, looser than what umask(1) gives as needed, users can share the repository contents without giving too loose an access to the worktree files.

Previous: Junio C Hamano
Message 5 of 5 in “Behavior of core.sharedRepository on non-bare Repositories”
  1. John A. LeuenhagenJan 17, 2022
  2. brian m. carlsonJan 17, 2022
  3. John A. LeuenhagenJan 17, 2022
  4. Junio C HamanoJan 17, 2022
  5. Junio C HamanoJan 17, 2022

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.