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

Re: Error: unable to unlink ... when using "git gc"

From
Sitaram Chamarty <sitaramc@gmail.com>
Date
Jan 7, 2009, 10:55 UTC
Message-ID
<slrngm92hr.72d.sitaramc@sitaramc.homelinux.net>
In-Reply-To
<200901070027.21721.bss@iguanasuicide.net>
On 2009-01-07, Boyd Stephen Smith Jr. <bss@iguanasuicide.net> wrote:
> On Tuesday 06 January 2009, Sitaram Chamarty <sitaramc@gmail.com> wrote=20
Show 5 quoted lines
>>    chmod g+ws .git
>>
>>Now set the group to something (I use "gitpushers" ;-)
>>
>>    chgrp -R gitpushers .git
> ISTR this breaking here when someone on the team had a umask like 077 and=20
> was using file:// or ssh:// to push.  I tended up "fixing" things with a=20
> cronjob, (which is a bit of a hack) IIRC.
That doesn't sound right.  "git help init" says:
 - 0xxx: 0xxx is an octal number and each file will have mode 0xxx
 - 0xxx will override users umask(2) value, and thus, users
   with a safe umask (0077) can use this option
 - 0660 is equivalent to group.

So when you say "group", you're saying "0660", and when you say "0660", you're overriding users umask value.

I sorta-kinda tested it (some output of the "find|xargs ls" is snipped for brevity):

    $ mkdir umt;cd umt
    $ umask         
    0022                                 
    $ git init --shared=group
    Initialized empty shared Git repository in /home/sitaram/t/umt/.git/
    (reverse-i-search)`find': sfind f|ack .git|map -x du -sk |sort -n
    $ find . -type d|xargs ls -ald     
    drwxr-xr-x 3 sitaram sitaram 4096 2009-01-07 15:59 .             
    drwxrwsr-x 7 sitaram sitaram 4096 2009-01-07 15:59 ./.git        
    $ dummy_commit                   
    Created initial commit afb2645: file-30824 at Wed Jan  7 15:59:23 IST 2009
     1 files changed, 1 insertions(+), 0 deletions(-)
     create mode 100644 file-30824
    $ find . -type d|xargs ls -ald
    drwxr-xr-x 3 sitaram sitaram 4096 2009-01-07 15:59 .
    drwxrwsr-x 9 sitaram sitaram 4096 2009-01-07 15:59 ./.git
    drwxrwsr-x 2 sitaram sitaram 4096 2009-01-07 15:59 ./.git/objects/a7
    drwxrwsr-x 2 sitaram sitaram 4096 2009-01-07 15:59 ./.git/objects/af
    drwxrwsr-x 2 sitaram sitaram 4096 2009-01-07 15:59 ./.git/objects/ca
    $ umask 077
    $ jeeves dummy_commit
    Created commit 232f157: file-3025 at Wed Jan  7 15:59:36 IST 2009
     1 files changed, 1 insertions(+), 0 deletions(-)
     create mode 100644 file-3025
    $ find . -type d|xargs ls -ald
    drwxr-xr-x  3 sitaram sitaram 4096 2009-01-07 15:59 .
    drwxrwsr-x  9 sitaram sitaram 4096 2009-01-07 15:59 ./.git
    drwxrws---  2 sitaram sitaram 4096 2009-01-07 15:59 ./.git/objects/23
    drwxrwsr-x  2 sitaram sitaram 4096 2009-01-07 15:59 ./.git/objects/a7
    drwxrws---  2 sitaram sitaram 4096 2009-01-07 15:59 ./.git/objects/a8
    drwxrwsr-x  2 sitaram sitaram 4096 2009-01-07 15:59 ./.git/objects/af
    drwxrws---  2 sitaram sitaram 4096 2009-01-07 15:59 ./.git/objects/c7
    drwxrwsr-x  2 sitaram sitaram 4096 2009-01-07 15:59 ./.git/objects/ca
Previous: Boyd Stephen Smith Jr.Next: Sitaram Chamarty
Message 13 of 17 in “Error: unable to unlink ... when using "git gc"”
  1. Johnny LeeJan 6, 2009
  2. Jeff KingJan 6, 2009
  3. Junio C HamanoJan 6, 2009
  4. Johnny LeeJan 6, 2009
  5. Matthieu MoyJan 6, 2009
  6. Jeff KingJan 6, 2009
  7. Johnny LeeJan 6, 2009
  8. Sitaram ChamartyJan 6, 2009
  9. Johnny LeeJan 6, 2009
  10. Sitaram ChamartyJan 6, 2009
  11. Jeff KingJan 7, 2009
  12. Boyd Stephen Smith Jr.Jan 7, 2009
  13. Sitaram ChamartyJan 7, 2009
  14. Sitaram ChamartyJan 7, 2009
  15. Boyd Stephen Smith Jr.Jan 7, 2009
  16. Sitaram ChamartyJan 7, 2009
  17. Boyd Stephen Smith Jr.Jan 7, 2009

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.