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

running "git init --shared" on an existing repo

From
Sitaram Chamarty <sitaramc@gmail.com>
Date
Mar 22, 2010, 06:30 UTC
Message-ID
<2e24e5b91003212330r2f3fd118y18386ef61c28ee89@mail.gmail.com>
Hi all,

If you forget to use "--shared" on your (bare) repo, and now need to adjist it after the fact to make perms work ok, you ought to be able to just run "git init --bare --shared" and things should be fine.

And it seems there was a beginning made.  builtin/init-db.c at line 220 says:
            /*
             * We would have created the above under user's umask -- under
             * shared-repository settings, we would need to fix them up.
             */
            if (shared_repository) {
                    adjust_shared_perm(get_git_dir());
                    adjust_shared_perm(git_path("refs"));
                    adjust_shared_perm(git_path("refs/heads"));
                    adjust_shared_perm(git_path("refs/tags"));
            }
Ideally, we should do the same to:

hooks info objects objects/?? objects/info objects/pack

also. The othes are easy, but does git internals have a defined way of doing that objects/?? part or should it just be the long way (it's been ages since I did any C but I'd be willing to try...)

-- Sitaram

Next: Junio C Hamano
Message 1 of 3 in “running "git init --shared" on an existing repo”
  1. Sitaram ChamartyMar 22, 2010
  2. Junio C HamanoMar 22, 2010
  3. Fwd: running "git init --shared" on an existing repoSitaram Chamarty, Mar 22, 2010

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.