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

Re: git /objects directory created 755 by default?

From
Andreas Ericsson <ae@op5.se>
Date
Dec 22, 2005, 16:52 UTC
Message-ID
<43AAD9D7.1070503@op5.se>
In-Reply-To
<Pine.LNX.4.63.0512221700310.18982@wbgn013.biozentrum.uni-wuerzburg.de>
Johannes Schindelin wrote:
Show 5 quoted lines
> Hi,
> 
> this is getting silly. The problem is: how to setup a shared repository, 
> i.e. a repository into which different users can push their updates.
> 

You're simplifying. Your question was "How can I set up a repository for multiple users to write to without setting a global umask for non-interactive shells?"

Junio said: "I agree the setting should not be limited to git-shell, but I do not think setting "umask" from git configuration is the right way either. For files and directories under $GIT_DIR, maybe imposing the policy git configuration file has is OK, but I think honoring the user's umask is the right thing for working tree files."

which I whole-heartedly agree with. I'd be completely furious if a tool ignored the umask I use for checking out files of a local repository just because I happen to do some work at the machine where the repo is stored (I imagine this couldn't possibly affect repositories cloned remotely, although that would surely have me going ballistic).

You answered that it would be good for hooks as well, although those can set their own umask easily enough (if you forget it there, you'll be hastily reminded the first time it breaks, so no real harm done).

The problem as I see it is to update only the $GIT_DIR files with the proper umask (or rather, just the objects/ and refs/ directories, since $GIT_DIR/. is never touched after being created and the other are for repo maintainers only).

Enter the nifty git-receive-pack, which does all the writing when a repo is being pushed to, unless bypassed from the /git/foo working tree for the /git/foo/.git repository. The latter is already discouraged, so we might as well ignore that. It's also nice because it will never mess with files that are for the repo maintainer only, although hooks can ofcourse do whatever they like to those files provided the repo maintainer allows it.

Now it's time to go home, but I'll have a patch by tonight unless you beat me to it. :)

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231
Previous: Johannes SchindelinNext: Johannes Schindelin
Message 21 of 34 in “git /objects directory created 755 by default?”
  1. Martin LanghoffDec 20, 2005
  2. Junio C HamanoDec 20, 2005
  3. Junio C HamanoDec 21, 2005
  4. Martin LanghoffDec 21, 2005
  5. Junio C HamanoDec 21, 2005
  6. Martin LanghoffDec 21, 2005
  7. Junio C HamanoDec 21, 2005
  8. Martin LanghoffDec 21, 2005
  9. Junio C HamanoDec 21, 2005
  10. Martin LanghoffDec 21, 2005
  11. Ben CliffordDec 22, 2005
  12. Johannes SchindelinDec 21, 2005
  13. Junio C HamanoDec 21, 2005
  14. Johannes SchindelinDec 21, 2005
  15. Andreas EricssonDec 22, 2005
  16. Johannes SchindelinDec 22, 2005
  17. Andreas EricssonDec 22, 2005
  18. Johannes SchindelinDec 22, 2005
  19. Andreas EricssonDec 22, 2005
  20. Johannes SchindelinDec 22, 2005
  21. Andreas EricssonDec 22, 2005
  22. Johannes SchindelinDec 22, 2005
  23. Junio C HamanoDec 22, 2005
  24. Johannes SchindelinDec 22, 2005
  25. Junio C HamanoDec 22, 2005
  26. Johannes SchindelinDec 22, 2005
  27. Junio C HamanoDec 23, 2005
  28. Andreas EricssonDec 23, 2005
  29. Alex RiesenDec 22, 2005
  30. Johannes SchindelinDec 22, 2005
  31. Alex RiesenDec 22, 2005
  32. Johannes SchindelinDec 22, 2005
  33. Alex RiesenDec 22, 2005
  34. Johannes SchindelinDec 22, 2005

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.