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

Re: metastore

From
Julian Phillips <julian@quantumfyre.co.uk>
Date
Oct 2, 2007, 23:32 UTC
Message-ID
<Pine.LNX.4.64.0710030018240.4087@reaper.quantumfyre.co.uk>
In-Reply-To
<20071002211518.GA10445@hardeman.nu>
On Tue, 2 Oct 2007, David Härdeman wrote:
Show 38 quoted lines
> On Tue, Oct 02, 2007 at 10:04:56PM +0200, David Kastrup wrote:
>> David Härdeman <david@hardeman.nu> writes:
>> 
>> >  On Tue, Oct 02, 2007 at 08:53:01PM +0100, martin f krafft wrote:
>> > > also sprach David Härdeman <david@hardeman.nu> [2007.09.19.2016 +0100]:
>> > > >  But I agree, if any changes were made to git, I'd advocate adding
>> > > >  arbitrary attributes to files (much like xattrs) in name=value
>> > > >  pairs, then any extended metadata could be stored in those
>> > > >  attributes and external scripts/tools could use them in some way
>> > > >  that makes sense...and also make sure to only update them when it
>> > > >  makes sense.
>> > > 
>> > > So where would those metdata be stored in your opinion?
>> > 
>> >  I'm not sufficiently versed in the internals of git to have an
>> >  informed opinion :)
>> 
>> I think we have something like a length count for file names in index
>> and/or tree.  We could just put the (sorted) attributes after a NUL
>> byte in the file name and include them in the count.  It would also
>> make those artificially longer file names work more or less when
>> sorting them for deltification.
>
> Or perhaps the index format could be extended to include a new field for 
> value=name pairs instead of overloading the name field.
>
> But as I said, I have no idea how feasible it would be to change git to 
> support another arbitrary length field in the index/tree file.
>
>> However, this requires implementing _policies_: it must be possible to
>> specify per repository exactly what will and what won't get tracked,
>> or one will get conflicts that are not necessary or appropriate.
>
> I think the opposite approach would be better. Let git provide set/get/delete 
> attribute operations and leave it at that. Then external programs can do what 
> they want with that data and add/remove/modify tags as necessary (and also 
> include the smarts to not, e.g. remove the permissions on all files if the 
> git repo is checked out to a FAT fs).

You need more than that. You need to be able to log, blame etc on the attributes. One of the big annoyances of Subversion properties is being unable to find out when or why a property value was changed.

I still don't see why the attributes need to be stored in git directly - particularly if you are going to use an external program to actually apply any settings - why not store the attributes as normal file (or files) of some sort tracked by git? You could use any number of methods - e.g. use an sqlite database stored in the root of your tree, or a .<name>.props file alongside each path that you have properties for. You could even write a system that uses such a method and was then SCM agnostic, allowing you to keep your attribute tracking system if/when something better than git comes along - or simply share it with less-fortunate souls stuck in an inferior system.

-- 
Julian

  ---
A strong conviction that something must be done is the parent of many
bad measures.
 		-- Daniel Webster
Previous: martin f krafftNext: david@lang.hm
Message 63 of 72 in “Re: Track /etc directory using Git”
  1. Thomas Harning Jr.Sep 14, 2007
  2. Nicolas VilzSep 14, 2007
  3. metastore (was: Track /etc directory using Git)martin f krafft, Sep 15, 2007
  4. Johannes SchindelinSep 15, 2007
  5. David KastrupSep 15, 2007
  6. martin f krafftSep 15, 2007
  7. Grzegorz KulewskiSep 15, 2007
  8. Johannes SchindelinSep 15, 2007
  9. Randal L. SchwartzSep 15, 2007
  10. david@lang.hmSep 16, 2007
  11. Randal L. SchwartzSep 16, 2007
  12. david@lang.hmSep 16, 2007
  13. Francis MoreauSep 17, 2007
  14. Randal L. SchwartzSep 17, 2007
  15. Daniel BarkalowSep 15, 2007
  16. Johannes SchindelinSep 15, 2007
  17. david@lang.hmSep 16, 2007
  18. Johannes SchindelinSep 16, 2007
  19. david@lang.hmSep 16, 2007
  20. Junio C HamanoSep 16, 2007
  21. David KastrupSep 16, 2007
  22. david@lang.hmSep 16, 2007
  23. Daniel BarkalowSep 16, 2007
  24. david@lang.hmSep 16, 2007
  25. Junio C HamanoSep 16, 2007
  26. Daniel BarkalowSep 16, 2007
  27. david@lang.hmSep 16, 2007
  28. Daniel BarkalowSep 16, 2007
  29. david@lang.hmSep 16, 2007
  30. martin f krafftSep 17, 2007
  31. david@lang.hmSep 17, 2007
  32. Josh EnglandSep 17, 2007
  33. david@lang.hmSep 16, 2007
  34. Junio C HamanoSep 16, 2007
  35. david@lang.hmSep 16, 2007
  36. Junio C HamanoSep 17, 2007
  37. david@lang.hmSep 17, 2007
  38. Junio C HamanoSep 17, 2007
  39. david@lang.hmSep 17, 2007
  40. Junio C HamanoSep 17, 2007
  41. Daniel BarkalowSep 17, 2007
  42. Junio C HamanoSep 17, 2007
  43. Jan HudecSep 16, 2007
  44. david@lang.hmSep 16, 2007
  45. martin f krafftSep 16, 2007
  46. Jan HudecSep 16, 2007
  47. david@lang.hmSep 16, 2007
  48. martin f krafftSep 17, 2007
  49. david@lang.hmSep 16, 2007
  50. martin f krafftSep 16, 2007
  51. David HärdemanSep 19, 2007
  52. martin f krafftOct 2, 2007
  53. David HärdemanOct 2, 2007
  54. David KastrupOct 2, 2007
  55. david@lang.hmOct 2, 2007
  56. martin f krafftOct 2, 2007
  57. david@lang.hmOct 2, 2007
  58. martin f krafftOct 2, 2007
  59. david@lang.hmOct 2, 2007
  60. martin f krafftOct 2, 2007
  61. David HärdemanOct 2, 2007
  62. martin f krafftOct 2, 2007
  63. Julian PhillipsOct 2, 2007
  64. david@lang.hmOct 3, 2007
  65. Johannes SchindelinOct 3, 2007
  66. Daniel BarkalowOct 2, 2007
  67. Pierre HabouzitSep 15, 2007
  68. martin f krafftSep 15, 2007
  69. Pierre HabouzitSep 15, 2007
  70. martin f krafftSep 15, 2007
  71. martin f krafftSep 15, 2007
  72. David KastrupSep 15, 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.