On 11/27/24 02:29, brian m. carlson wrote:
[...] There's a Go-based version[1] which does support storing
xattrs. Again, you can use a `post-checkout` hook here.
Since mtree is a key-value format, you can also extend the value with
other data. I use a similar format in my dotfiles to specify install
location, for instance, so I recommend this as a good way to store this
data.
I just installed gomtree, and read my xattrs: looks very promising!
Thank you for the suggestion. :)
I'll read up on "post-checkout hooks" to see how I can integrate this in
my git setup.
In case anyone's curious, here's an example of gomtree's output text for
a file annotated using `yt-dlp --xattr`:
```
Universal\040Sequence\040\13320vPbH6UWIc].mp4
xattr.user.xdg.referrer.url=aHR0cHM6Ly93d3cueW91dHViZS5jb20vd2F0Y2g/dj0yMHZQYkg2VVdJYw==
xattr.user.dublincore.title=VW5pdmVyc2FsIFNlcXVlbmNl
xattr.user.dublincore.date=MjAxNi0wOS0xNA==
xattr.user.dublincore.contributor=Q29uc3BpcmFjeQ==
xattr.user.dublincore.format=Mjk4IC0gMTI4MHg1NDAgKDcyMHA2MCkrMTQwIC0gYXVkaW8gb25seSAobWVkaXVtKQ==
xattr.user.dublincore.description=VmlkZW8gcmVjb3JkaW5nIG9mIHRoZSBmaW5hbCB2ZXJzaW9uIG9mICJVbml2ZXJzYWwgU2VxdWVuY2UiLCBhIDY0IEtCeXRlIHJlYWx0aW1lIGRlbW8gYnkgQ29uc3BpcmFjeS4gRmlyc3QgcHJlc2VudGVkIGF0IHRoZSBGdW5jdGlvbiAyMDE2IGRlbW9wYXJ0eSwgd2hlcmUgaXQgcmVhY2hlZCAxc3QgcGxhY2UuCgpEb3dubG9hZCB0aGUgcmVhbHRpbWUgdmVyc2lvbiBhbmQgc291bmR0cmFjayBhdApodHRwOi8vY29uc3BpcmFjeS5odS9yZWxlYXNlLzY0ay91bml2ZXJzYWxfc2VxdWVuY2UvCgpFbmdpbmUgY29kZSBhbmQgZWZmZWN0cyBieQpCT1lDCgpWaXN1YWxzIGFuZCBkaXJlY3Rpb24gYnkKWk9PTQoKU3ludGggYW5kIG11c2ljIGJ5CkdBUkdBSgoKaHR0cDovL3d3dy5jb25zcGlyYWN5Lmh1Cmh0dHA6Ly9mYWNlYm9vay5jb20vY29uc3BpcmFjeS5odQpodHRwOi8vdHdpdHRlci5jb20vY29uc3BpcmFjeWh1CgojY29uc3BpcmFjeSAjZGVtb3NjZW5lICM2NGsgI2ludHJvICNyZWFsdGltZSAjaHVuZ2FyeQ==
```
Values are base64-encoded.
Nice.
Regards,
Peter B.