diff --git a/doc/todo/Add_annex.orig-uuid_config_for___39__ephemeral_clones__39__.mdwn b/doc/todo/Add_annex.orig-uuid_config_for___39__ephemeral_clones__39__.mdwn new file mode 100644 index 0000000000..b11bcfe9a4 --- /dev/null +++ b/doc/todo/Add_annex.orig-uuid_config_for___39__ephemeral_clones__39__.mdwn @@ -0,0 +1,8 @@ +In DataLad we have a special mode for cloning git-annex repos called `--reckless=ephemeral` which we discussed with you Joey awhile back as a solution for throw away temporary copies of repos for processing in such a way that we would not need to fetch all TBs of already present on local drive data. + +One gotcha is that in such a case population of `.git/annex` with new keys in the clone, does not inform original one about those changes. What we then need to do is to eventually run `git annex fsck` in original location so it realizes that it got all those possibly new keys. That might take at times quite a while. + +I wondered if may be git-annex could gain some "native" support for such use-case which would avoid need for `annex fsck` and possibly would immediately reflect information on changes to availability either in that reckless clone (e.g. if it knows UUID of original one e.g. as stored in `annex.orig-uuid` config), or even in the original repo (by following the symlink or just some `annex.orig-path` dedicated config variable). WDYT Joey? + +[[!meta author=yoh]] +[[!tag projects/datalad]] diff --git a/doc/todo/Add_annex.orig-uuid_config_for___39__ephemeral_clones__39__/comment_1_7815551c0ec6d933ae5537e28fb183ad._comment b/doc/todo/Add_annex.orig-uuid_config_for___39__ephemeral_clones__39__/comment_1_7815551c0ec6d933ae5537e28fb183ad._comment new file mode 100644 index 0000000000..da38edfc01 --- /dev/null +++ b/doc/todo/Add_annex.orig-uuid_config_for___39__ephemeral_clones__39__/comment_1_7815551c0ec6d933ae5537e28fb183ad._comment @@ -0,0 +1,78 @@ +[[!comment format=mdwn + username="yarikoptic" + avatar="http://cdn.libravatar.org/avatar/f11e9c84cb18d26a1748c33b48c924b4" + subject="comment 1" + date="2023-03-10T02:52:08Z" + content=""" +doh - forgot to add example of what kind of mode of operation I am talking about + +
+Here is the script + +```shell +#!/bin/bash +set -ex + +cd \"$(mktemp -d ${TMPDIR:-/tmp}/dl-XXXXXXX)\" + +mkdir orig +( cd orig; git init; git annex init; echo 123 > 123; git annex add 123; git commit -m 123 123; ) + +git clone orig ephemeral + +( +cd ephemeral + +# making it ephemeral +ln -s ../../orig/.git/annex .git/annex + +git annex init; + +echo 124 > 124 +git annex add 124 +git commit -m 124 124 + +git annex whereis 124 +) + +( +cd orig; + +git remote add ephemeral ../ephemeral +git pull ephemeral master + +: it would still not know that it got 124 +git annex whereis 124 || echo \"exited with $?\" + +git annex fsck + +: but would know now after fsck +git annex whereis 124 +) + +``` +
+ +running which at the end produces + +``` ++ : it would still not know that it got 124 ++ git annex whereis 124 +whereis 124 (0 copies) failed +whereis: 1 failed ++ echo 'exited with 1' +exited with 1 ++ git annex fsck +fsck 123 (checksum...) ok +fsck 124 (fixing location log) (checksum...) ok +(recording state in git...) ++ : but would know now after fsck ++ git annex whereis 124 +whereis 124 (1 copy) + a813ca99-ce43-4e57-b7d9-c3a1456c6b55 -- yoh@lena:~/.tmp/dl-hlNOqBM/orig [here] +ok +``` + +where `124` file was annex added in the reckless clone. +``` +"""]]