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

Re: git support for "xattrs" (extended filesystem attributes)?

From
Peter B. <pb@das-werkstatt.com>
Date
Nov 27, 2024, 20:52 UTC
Message-ID
<f58d0ca9-305f-50e5-83f7-7939d310b8fc@das-werkstatt.com>
In-Reply-To
<Z0Z2DVuR2PiN-oxy@tapette.crustytoothpaste.net>
On 11/27/24 02:29, brian m. carlson wrote:
Show 7 quoted lines
> [...] 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.

Previous: Peter B.
Message 7 of 7 in “git support for "xattrs" (extended filesystem attributes)?”
  1. Peter B.Nov 26, 2024
  2. Junio C HamanoNov 26, 2024
  3. Jeff KingNov 26, 2024
  4. Junio C HamanoNov 27, 2024
  5. brian m. carlsonNov 27, 2024
  6. Peter B.Nov 27, 2024
  7. Peter B.Nov 27, 2024

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.