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

Re: tracking perms/ownership

From
JEJosh England <jjengla@sandia.gov>
Date
Aug 24, 2007, 18:56 UTC
Message-ID
<1187981803.6357.173.camel@beauty>
In-Reply-To
<alpine.LFD.0.999.0708241119140.25853@woody.linux-foundation.org>
On Fri, 2007-08-24 at 11:23 -0700, Linus Torvalds wrote:
Show 13 quoted lines
> 
> On Fri, 24 Aug 2007, Josh England wrote:
> > 
> > Do you think its OK to cache this stuff in the index, though?
> > write-tree could then just dump the perms/ownership out as gitattributes
> > somewhere.
> 
> I'd really prefer not.
> 
> The index state - very much by design - matches the filesystem "stat" 
> data, not the internal git data. So "ce_size" matches the checked-out 
> size, not the native git data size (ie with CRLF conversion, it matches 
> not the checked-in data, but the filesystem version). 

That's exactly what I'm after, too: having a snapshot of all lstat data in the index, because I don't want to have to do an extra stat somewhere.

> And the same really goes for ce_uid/ce_gid: they have to match what's on 
> the filesystem, because they are used not to track user information, but 
> to verify that the inode data is valid!

But the stat data (even uid/gid) is in there nonetheless, right? If everything is in there already I wouldn't need to add a thing. I just want to access the index cache rather than hitting the filesystem directly.

> Yeah, we could just ignore them for checking "is the inode the same", but 
> that would actually end up *defeating* the point of what you want to do: 
> at that point, we'd also obviously ignore it when ownership changes!

If we view the index as being a snapshot of the filesystem, and if perm/ownership data is stored as .gitattributes in the actual repo, then the perm/ownership engine just has to reconcile between the index and the .gitattributes file for both the read and write case. Differences in the write case would result in the .gitattributes being updated. Differences in the read case would result in chown/chmod being run in the working tree. Does this make sense?

-JE
Previous: Linus TorvaldsNext: Junio C Hamano
Message 17 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.