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