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

Re: tracking perms/ownership

From
David Kastrup <dak@gnu.org>
Date
Aug 24, 2007, 21:30 UTC
Message-ID
<85wsvkfwnc.fsf@lola.goethe.zz>
In-Reply-To
<alpine.LFD.0.999.0708241039250.25853@woody.linux-foundation.org>
Linus Torvalds <torvalds@linux-foundation.org> writes:
Show 8 quoted lines
> On Fri, 24 Aug 2007, David Kastrup wrote:
>
>> In your example, neither installed files nor ownership are tracked
>> in the filesystem.  Both are "tracked" in the Makefile.  Or rather
>> than being tracked, they are explicitly catered for by the user.
>
> And I seriously am saying that that is the only way to handle things
> sanely in a distributed content tracker like git.

Well, maybe _if_ you are using it as a distributed content tracker. But git is excellent at tracking contents (and resolving conflicts and merged) even if you _don't_ distribute.

Anyway, my beef with using something like .gitattributes or similar for tracking permissions is twofold:

a) if I am tracking a directory, having to track additional files clutters the directory. So if one uses a separate file for tracking, it should be able to use a file that is not actually in the work tree. But it still needs to be versioned. One could possibly fudge this by creating an artificial work tree with the tracked directory being in a subdirectory of it, but that's all pretty dorky.

b) merge resolution and movement tracking. Delegating stuff to a file and using the _file_ merging and tracking mechanisms is just not really the same thing. So it would be nice to at least have "pluggable merge strategies" for particular files, or treat gitattributes special with regard to merging, anyway.

Personally, I'm leaning towards a pluggable policy system containing rules how permission information is represented textually in the repository (that would allow acls and uid gid information), how the index is updated from repo and workdir and vice versa. The default policy would just talk about 777 or 666 (or 775 and 644) as it does now.

We already have a policy flag that optionally blocks the information flow from/to the index regarding executable bits. So it is not like the concept is alien.

On the matter of taste: I feel fine about storing numerical uid/gid data in the index, but I am already getting queasy with the idea of storing them numerically in the repository: that's a place where I find symbolic names more appropriate.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum
Previous: Robin RosenbergNext: Josh England
Message 21 of 41 in “empty directories”
  1. Josh EnglandAug 21, 2007
  2. SeanAug 21, 2007
  3. Josh EnglandAug 22, 2007
  4. Linus TorvaldsAug 22, 2007
  5. David KastrupAug 22, 2007
  6. Josh EnglandAug 23, 2007
  7. tracking perms/ownership [was: empty directories]Josh England, Aug 23, 2007
  8. Junio C HamanoAug 23, 2007
  9. Linus TorvaldsAug 23, 2007
  10. David KastrupAug 24, 2007
  11. Linus TorvaldsAug 24, 2007
  12. Josh EnglandAug 24, 2007
  13. David KastrupAug 24, 2007
  14. Linus TorvaldsAug 24, 2007
  15. Josh EnglandAug 24, 2007
  16. Linus TorvaldsAug 24, 2007
  17. Josh EnglandAug 24, 2007
  18. Junio C HamanoAug 24, 2007
  19. Josh EnglandAug 24, 2007
  20. Robin RosenbergAug 24, 2007
  21. David KastrupAug 24, 2007
  22. Josh EnglandAug 24, 2007
  23. Junio C HamanoAug 24, 2007
  24. Josh EnglandAug 24, 2007
  25. Josh EnglandAug 24, 2007
  26. Josh EnglandAug 24, 2007
  27. Johannes SchindelinAug 24, 2007
  28. Jeff KingAug 24, 2007
  29. Josh EnglandAug 24, 2007
  30. Jeff KingAug 24, 2007
  31. Johannes SchindelinAug 25, 2007
  32. Junio C HamanoAug 25, 2007
  33. Junio C HamanoAug 25, 2007
  34. Jeff KingAug 24, 2007
  35. Johannes SchindelinAug 25, 2007
  36. Jason GarberAug 24, 2007
  37. Jakub NarebskiAug 22, 2007
  38. Jakub NarebskiAug 22, 2007
  39. Salikh ZakirovAug 22, 2007
  40. Linus TorvaldsAug 22, 2007
  41. David KastrupAug 22, 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.