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

git leaves behind .git/COMMIT_EDITMSG non-shared in --shared non-bare repo

From
Yaroslav Halchenko <yoh@onerussian.com>
Date
Dec 18, 2015, 19:55 UTC
Message-ID
<20151218195503.GA4554@onerussian.com>

Not sure for what batch operations that file is actually useful, but the story is that if we have a shared git repo (I know -- might not be as common of a situation but possible and allowed to happen), then if one from the shared group commits within that repository, it becomes impossible for another person to commit.

git does take care about chmod'ing all the files under .git/objects etc for --shared operation, but leaves .git/COMMIT_EDITMSG at the mercy of user's umask. IMHO correct resolution, if leaving that file behind is necessary, is to chmod it in the same fashion as any other internal .git file in --shared mode -- with group write permission.

I have reproduced that behavior with today's version of git as of 2.7.0.rc1.5.gf3adf45.

-- 
Yaroslav O. Halchenko
Center for Open Neuroscience     http://centerforopenneuroscience.org
Dartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755
Phone: +1 (603) 646-9834                       Fax: +1 (603) 646-1419
WWW:   http://www.linkedin.com/in/yarik        
Next: Johannes Schindelin
Message 1 of 5 in “git leaves behind .git/COMMIT_EDITMSG non-shared in --shared non-bare repo”
  1. Yaroslav HalchenkoDec 18, 2015
  2. Johannes SchindelinDec 19, 2015
  3. SZEDER GáborDec 19, 2015
  4. Johannes SchindelinDec 19, 2015
  5. Yaroslav HalchenkoDec 19, 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.