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

Re: git and symlinks as tracked content

From
Linus Torvalds <torvalds@osdl.org>
Date
May 3, 2005, 23:42 UTC
Message-ID
<Pine.LNX.4.58.0505031632400.26698@ppc970.osdl.org>
In-Reply-To
<427806CA.6030302@zytor.com>
On Tue, 3 May 2005, H. Peter Anvin wrote:
> 
> No, the tree object *ALREADY* records these.
Not ownership.

Yes, the permissions are there, but if you actually want to track ownership (or things like "mtime" etc), you really do have to track it outside the tree object.

Also, right now git will actually ignore most of the permission bits too. We can change that, and make it a dynamic setting somewhere (some flag in a ".git/settings" file or something), but it does boil down to the fact that a software development tree tracker wants different things than something that tracks system settings.

For example, generating different trees just because different users had different umask settings clearly didn't work out. Which means that right now git really only tracks the "owner execute" bit of the permissions, and always resets the other bits to 0755 or 0644 depending on that _one_ bit.

And similarly, tracking actual uid/gid information would _really_ not work for a distributed kernel source management system, so that's not even in the tree.

So if you want to track system files, right now "raw git" is _not_ the way to do it. You'd want something else.

Of course, that's actually true largely even of normal /dev contents. That's why we've moved towards udev, and having things like device permissions and ownership not be "filesystem attributes", but really _rules_ in a udev database. So the fact that git doesn't track them isn't necessarily a problem for /dev - since modern /dev really wants to track them at a higher level _anyway_ (and you'd use git to track the _rules_, not the ownership things themselves).

But if you'd want to track other system directories with git, you'd probably need to either (a) do serious surgery on git itself, or (probably preferable) by (b) track the extra things you want "manually" using a file (that is tracked in git) that describes the ownership and permission data.

Whether git is really suitable for tracking non-source projects is obviously debatable. It's not what it was designed for, and it _may_ be able to do so partly just by luck.

			Linus
Previous: H. Peter AnvinNext: Junio C Hamano
Message 15 of 29 in “git and symlinks as tracked content”
  1. Kay SieversMay 3, 2005
  2. Linus TorvaldsMay 3, 2005
  3. Morten WelinderMay 3, 2005
  4. H. Peter AnvinMay 3, 2005
  5. Andreas GalMay 3, 2005
  6. Linus TorvaldsMay 3, 2005
  7. Kay SieversMay 3, 2005
  8. Junio C HamanoMay 3, 2005
  9. Andreas GalMay 3, 2005
  10. Junio C HamanoMay 3, 2005
  11. Sym-links, b/c-special files, pipes, ... Scope CreepBrian O'Mahoney, May 4, 2005
  12. H. Peter AnvinMay 3, 2005
  13. Junio C HamanoMay 3, 2005
  14. H. Peter AnvinMay 3, 2005
  15. Linus TorvaldsMay 3, 2005
  16. Junio C HamanoMay 3, 2005
  17. David A. WheelerMay 4, 2005
  18. Daniel BarkalowMay 4, 2005
  19. Alan ChandlerMay 5, 2005
  20. read-only git repositoriesDavid Lang, May 5, 2005
  21. SeanMay 5, 2005
  22. David A. WheelerMay 6, 2005
  23. Daniel BarkalowMay 5, 2005
  24. Junio C HamanoMay 3, 2005
  25. Kay SieversMay 4, 2005
  26. Junio C HamanoMay 4, 2005
  27. Kay SieversMay 5, 2005
  28. Junio C HamanoMay 5, 2005
  29. Kay SieversMay 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.