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

Re: why not preserve file permissions?

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 5, 2008, 22:38 UTC
Message-ID
<7vljuuxn66.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<87tz9igzbr.fsf@jidanni.org>
jidanni@jidanni.org writes:
Show 8 quoted lines
> Why not preserve permissions the way you find them, instead of just
> using 644 and 755? It certainly couldn't be more complicated than what
> you are doing now, and that way one could do things like use git to
> update system administration files across a sneakernet containing e.g.,
> # dlocate -lsconf exim4-config|sed 's/ .*//'|sort -u
> -rw-r-----
> -rw-r--r--
> -rwxr-xr-x

Actually in a very early days, git used to record the full (mode & 0777) for blobs.

Once people started using git, everybody realized that it had a very unpleasant side effect that the resulting tree depended on user's umasks, because one person records a blob with mode 664 and the next person who modifies the file would record with mode 644, and it made it very hard to keep track of meaningful changes to the source code. This issue was fixed long time ago with commit e447947 (Be much more liberal about the file mode bits., 2005-04-16).

Previous: Jakub NarebskiNext: Jeff King
Message 3 of 5 in “why not preserve file permissions?”
  1. jidanni@jidanni.orgDec 5, 2008
  2. Jakub NarebskiDec 5, 2008
  3. Junio C HamanoDec 5, 2008
  4. Jeff KingDec 6, 2008
  5. Daniel BarkalowDec 6, 2008

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.