From 1f37d0b00dfa3c60f37544073437bd7b4da0c51c Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 30 Apr 2024 15:13:59 -0400 Subject: [PATCH] promote comment to todo --- ..._3f06096e582178b4c69d63e84735d911._comment | 11 +++++++ doc/todo/wherewas.mdwn | 29 +++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 doc/git-annex-whereis/comment_4_3f06096e582178b4c69d63e84735d911._comment create mode 100644 doc/todo/wherewas.mdwn diff --git a/doc/git-annex-whereis/comment_4_3f06096e582178b4c69d63e84735d911._comment b/doc/git-annex-whereis/comment_4_3f06096e582178b4c69d63e84735d911._comment new file mode 100644 index 0000000000..5ea5d0a457 --- /dev/null +++ b/doc/git-annex-whereis/comment_4_3f06096e582178b4c69d63e84735d911._comment @@ -0,0 +1,11 @@ +[[!comment format=mdwn + username="joey" + subject="""Re: How to find last available version of a file?""" + date="2024-04-30T18:52:12Z" + content=""" +There's not currently a way to do that without some scripting to get +the keys, and then `git-annex whereis --key`. + +I think this idea is worth doing something about, so I made this todo: +[[todo/wherewas]]. +"""]] diff --git a/doc/todo/wherewas.mdwn b/doc/todo/wherewas.mdwn new file mode 100644 index 0000000000..4061af5c98 --- /dev/null +++ b/doc/todo/wherewas.mdwn @@ -0,0 +1,29 @@ +Repo that contains the latest/current version of a file is not accessible. +Can git annex whereis find the last available version of a file in other +repos (or a specific repo)? + +I can looping through commit log and running whereis for each commit until +an earlier version of a file is found, but perhaps there is a better way to +do it with a single command? + +> Not currently, but I think it would be a useful command to have available +> without scripting. +> +> So the use case seems to be that the most recent version of a file is not +> accessible currently, but you want to access some version of the file, +> and will settle for an older version. +> +> One interface could be: +> +> git-annex findversion thefile --in=foo +> +> Which would look at past versions of thefile that are present in remote +> foo, and output something like "master@{10}", or just a bare +> git commit sha. Which you can `git checkout` +> and then `git-annex get thefile --from=foo` will work to access the +> content. +> +> One problem with this interface is it would need to be limited to a +> single file, because there may be no commit that has the latest +> versions of several files that are all in the specified remote. +> --[[Joey]]