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

Re: [PATCH] Restore umasks influence on the permissions of work tree created by clone

From
Alex Riesen <raa.lkml@gmail.com>
Date
Jul 9, 2012, 18:21 UTC
Message-ID
<CALxABCY=0J6FN7MHLst4mf3PBV729U=wpVB3XNR-wWopdQ23nA@mail.gmail.com>
In-Reply-To
<7vobnpn224.fsf@alter.siamese.dyndns.org>
On Mon, Jul 9, 2012 at 3:41 AM, Junio C Hamano <gitster@pobox.com> wrote:
Show 11 quoted lines
> Alex Riesen <raa.lkml@gmail.com> writes:
>
>> The original (shell coded) version of the git-clone just used mkdir(1)
>> to create the working directories. The builtin changed the mode argument
>> to mkdir(2) to 0755, which was a bit unfortunate, as there are use
>
> A much more important reason why this is a good change (I think you
> could even say this is a bugfix) is because directories and files in
> the working tree are created with entry.c::create_directories() and
> entry.c::create_file(), and they do honour umask settings, and the
> top-level of the working tree should be handled the same way, no?

Well, the top-level directories of anything are often handled specially, but yes, I agree indeed. Frankly, I wondered why the top-level wasn't created safe_create_leading_directories() or something like that.

>> cases where umask-controlled creation is preferred and in any case
>> it is a well-known behaviour for new directory/file creation.
>
> Sign-off?
It was an RFC until now :)
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Previous: Junio C HamanoNext: Jeff King
Message 5 of 10 in “git-clone ignores umask for working tree”
  1. Alex RiesenJul 6, 2012
  2. Daniel BarkalowJul 6, 2012
  3. Restore umasks influence on the permissions of work tree created by cloneAlex Riesen, Jul 7, 2012
  4. Junio C HamanoJul 9, 2012
  5. Alex RiesenJul 9, 2012
  6. Jeff KingJul 9, 2012
  7. Junio C HamanoJul 9, 2012
  8. Junio C HamanoJul 9, 2012
  9. rerere: make rr-cache fanout directory honor umaskJunio C Hamano, Jul 9, 2012
  10. Jeff KingJul 10, 2012

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.