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

Re: [GIT PATCH] SCSI updates for 2.6.14

From
Linus Torvalds <torvalds@osdl.org>
Date
Nov 5, 2005, 19:32 UTC
Message-ID
<Pine.LNX.4.64.0511051119080.3316@g5.osdl.org>
In-Reply-To
<1131216913.3614.15.camel@mulgrave>
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
Message 1 of 1 in “Re: [GIT PATCH] SCSI updates for 2.6.14”
  1. Linus TorvaldsNov 5, 2005

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.