On Sat, 5 Nov 2005, James Bottomley wrote:
Show 6 quoted lines
> > On Sat, 2005-11-05 at 10:42 -0800, Linus Torvalds wrote: > > James: what's your umask on master? Maybe you've set it to 0077, from the > > default 0002? > > I set it to 0022 ... could that be the problem?
No, 0022 should still be perfectly fine, and should result in drwxr-xr-x, not your strange things.
Looking at things, I can't imagine it being anything else than a cpio bug (or misfeature - I don't know where cpio _could_ get the permissions for the intermediate directories from). But that implies that the system git shouldn't have mattered, and if you used "git clone -l" with your old git it should have done exactly the same thing.
Junio: I just confirmed this. Do a
git clone -l src dst
with any git, and you'll end up with
... drwx------ 2 torvalds torvalds 4096 Nov 5 11:22 de drwx------ 2 torvalds torvalds 4096 Nov 5 11:22 df drwx------ 2 torvalds torvalds 4096 Nov 5 11:22 e0 ... drwx------ 2 torvalds torvalds 4096 Nov 5 11:22 ff drwxrwxr-x 2 torvalds torvalds 4096 Nov 5 11:22 info drwxrwxr-x 2 torvalds torvalds 4096 Nov 5 11:22 pack
regardless of umask.
Happens with both cpio 2.5 and 2.6.
I _think_ it's this:
...
find objects -type f -print |
cpio -puamd$l "$D/.git/" || exit 1
...and I suspect that if you remove the "-type f" it will just work (because it will get the directory permissions from the source). But cpio is black magic to me (very un-unixy feel to it, I'd guess it comes from some odd other pre-unix OS).
Linus