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

Re: confused about preserved permissions

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 23, 2007, 07:03 UTC
Message-ID
<7vodgyvikp.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<20070823060052.GA25153@piper.oerlikon.madduck.net>
martin f krafft <madduck@madduck.net> writes:
Show 6 quoted lines
> also sprach Junio C Hamano <gitster@pobox.com> [2007.08.23.0009 +0200]:
>> We deliberately chose not to use that space, and this default is
>> very unlikely to change.
>
> The downsides included change in SHA hash on mode change, as far as
> I can remember. Anything else?

More serious practical problem was that sane developers tend to have either 022 or 002 umask. You may check out my project (whose regular files are either 0664 or 0775, according to my umask settings), but the checkout honors your umask and you would get 0644 or 0755 on your copies, and you would check in with differemtn modes. The merge I would do later with you would get needless conflicts on modes.

What makes the mode conflict "needless" is that we are primarily talking about source code control, by the way. It is very reasonable if you want to retarget git, probably borrowing most of its infrastructure, to build a backup system to keep track of files in /etc hierarchy. It would be crucial for _your_ system to keep track of owner/group and mode bits. If the modes or ownership conflict during a merge, that is _not_ needless conflict at all --- the user needs to decide if /etc/shadow should or should not be world readable, and send a nasty message to whoever asked you to pull such a change to make the file world readable after you detect such a mistake while you are merging. It becomes essential to your "backup" system.

But in the context of git project, and source code management, which is its primary application, it is not worth to keep track of such mode differences that come from umask differences of contributors. You could add such a full-mode-bits and ownership support to git, but that would stay secondary at best. It is entirely possible that the code to support such an extension would be too intrusive to clutter git codebase, at which point the "backup" application may have to become a fork of git, not part of it.

Previous: Jan HudecNext: Mike Hommey
Message 23 of 39 in “confused about preserved permissions”
  1. martin f krafftAug 20, 2007
  2. Pierre HabouzitAug 20, 2007
  3. martin f krafftAug 20, 2007
  4. Mike HommeyAug 20, 2007
  5. David KastrupAug 20, 2007
  6. Mike HommeyAug 20, 2007
  7. David KastrupAug 20, 2007
  8. René ScharfeAug 21, 2007
  9. Documentation: update tar.umask defaultRené Scharfe, Aug 21, 2007
  10. Mike HommeyAug 21, 2007
  11. René ScharfeAug 22, 2007
  12. Alex RiesenAug 20, 2007
  13. Benoit SIGOUREAug 22, 2007
  14. Johannes SixtAug 22, 2007
  15. Junio C HamanoAug 22, 2007
  16. martin f krafftAug 23, 2007
  17. David KastrupAug 23, 2007
  18. martin f krafftAug 23, 2007
  19. Benoit SIGOUREAug 23, 2007
  20. Junio C HamanoAug 23, 2007
  21. David KastrupAug 23, 2007
  22. Jan HudecSep 3, 2007
  23. Junio C HamanoAug 23, 2007
  24. Mike HommeyAug 20, 2007
  25. Jan HudecAug 20, 2007
  26. Mike HommeyAug 20, 2007
  27. Alex RiesenAug 20, 2007
  28. Mike HommeyAug 20, 2007
  29. Jan HudecAug 20, 2007
  30. David KastrupAug 20, 2007
  31. Mike HommeyAug 20, 2007
  32. Jan HudecAug 20, 2007
  33. David KastrupAug 20, 2007
  34. Mike HommeyAug 20, 2007
  35. David KastrupAug 20, 2007
  36. Shawn O. PearceAug 21, 2007
  37. Junio C HamanoAug 21, 2007
  38. Mike HommeyAug 21, 2007
  39. David KastrupAug 21, 2007

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.