From d7da4ee00a17036cde0c33e5bbd8432b40adf780 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 12 Nov 2020 12:29:15 -0400 Subject: [PATCH] comment --- ..._c81e5d438b06e28392e4ae789a84a2e8._comment | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 doc/todo/calckey___91__--path__93___given_a_checksum_and_filename__63__/comment_1_c81e5d438b06e28392e4ae789a84a2e8._comment diff --git a/doc/todo/calckey___91__--path__93___given_a_checksum_and_filename__63__/comment_1_c81e5d438b06e28392e4ae789a84a2e8._comment b/doc/todo/calckey___91__--path__93___given_a_checksum_and_filename__63__/comment_1_c81e5d438b06e28392e4ae789a84a2e8._comment new file mode 100644 index 0000000000..882827c6f2 --- /dev/null +++ b/doc/todo/calckey___91__--path__93___given_a_checksum_and_filename__63__/comment_1_c81e5d438b06e28392e4ae789a84a2e8._comment @@ -0,0 +1,27 @@ +[[!comment format=mdwn + username="joey" + subject="""comment 1""" + date="2020-11-12T15:45:01Z" + content=""" +Any extension you pick to use would work fine; it's not a value that needs +to be calculated in a long-term reproducible way, and git-annex has refined +the extensions it picks repeatedly. + +I'm wary about exposing a way for git-annex to calculate the extension. +It risks a slippery slope to exposing other internal details of how other +backends (eg URL) construct parts of their keys. Especially with the +external backends existing now. + +This does generate the path to the annex object: + + git annex examinekey $KEY --format='.git/annex/objects/${hashdirmixed}${key}/${key}' + +Except, hmm, when the repo is tuned with annex.tune.objecthash1=true +it does not take that into account. And if the repo is tuned with +annex.tune.objecthashlower=true that needs to be `${hashdirlower}` instead. + +I think it would be a good idea to add something to examinekey that +simplifies this, eg `${objectpath}` that would exand to the full path. +Taking the tuning edge cases into account and also future-proofing the +interface. +"""]] -- 2.39.5