From 38caaee8fcd5dcb7c7b506f4c1b3476289c22154 Mon Sep 17 00:00:00 2001 From: "sorsasampo@35b3d76c4c73ffc3f2c89e965c47a3f6a2721228" Date: Sun, 20 May 2018 03:45:06 +0000 Subject: [PATCH] --- doc/todo/support_for_storing_xattrs.mdwn | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 doc/todo/support_for_storing_xattrs.mdwn diff --git a/doc/todo/support_for_storing_xattrs.mdwn b/doc/todo/support_for_storing_xattrs.mdwn new file mode 100644 index 0000000000..6edf0a9d26 --- /dev/null +++ b/doc/todo/support_for_storing_xattrs.mdwn @@ -0,0 +1,15 @@ +It would be nice to have support for storing extended attributes in git-annex. + +There are some useful [proposed metadata attributes](https://www.freedesktop.org/wiki/CommonExtendedAttributes/#proposedmetadataattributes): + +* user.xdg.comment: A comment specified by the user. This comment could be displayed by file managers +* user.xdg.origin.url: Set on a file downloaded from a url. Its value should equal the url it was downloaded from. +* user.xdg.origin.email.subject: Set on an email attachment when saved to disk. It should get its value from the originating message's "Subject" header +* user.xdg.origin.email.from: Set on an email attachment when saved to disk. It should get its value from the originating messsage's "From" header. For example '"John Doe" ', or 'jdoe@example.com' +* user.xdg.origin.email.message-id: Set on an email attachment when saved to disk. It should get its value from the originating message's "Message-Id" header. + +At least `curl --xattr` saves `xdg.origin.url`. + +Perhaps `git-annex-metadata` could be leveraged to automatically store and restore xattrs? Might even work that addition of xattrs would always have to be done through a git-annex command, but restoration would be done automatically if git-annex noticed there are xattrs stored in metadata, and the file system is mounted with `user_xattr`. + +The `user` namespace is used for user xattrs and thus for "proposed metadata attributes" above. These attributes are valid git-annex metadata fields as-is.