From 84960da5220e72a3167095e2b1bed4ff44f75034 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 6 Jan 2020 13:24:39 -0400 Subject: [PATCH] comment --- ..._366978d6fda3bc00ccbfc2f9548a1492._comment | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 doc/todo/git-annex-reinject_--known_should_not_fail_when_the_file_extension_is_different/comment_1_366978d6fda3bc00ccbfc2f9548a1492._comment diff --git a/doc/todo/git-annex-reinject_--known_should_not_fail_when_the_file_extension_is_different/comment_1_366978d6fda3bc00ccbfc2f9548a1492._comment b/doc/todo/git-annex-reinject_--known_should_not_fail_when_the_file_extension_is_different/comment_1_366978d6fda3bc00ccbfc2f9548a1492._comment new file mode 100644 index 0000000000..3e25f3cad4 --- /dev/null +++ b/doc/todo/git-annex-reinject_--known_should_not_fail_when_the_file_extension_is_different/comment_1_366978d6fda3bc00ccbfc2f9548a1492._comment @@ -0,0 +1,20 @@ +[[!comment format=mdwn + username="joey" + subject="""comment 1""" + date="2020-01-06T17:11:58Z" + content=""" +I can't think of a reasonable way to implement this. + +It would need to hash and then look for a known SHA256E key that uses the +hash. But the layout of the git-annex branch doesn't provide any way to do +that, except for iterating over every filename in the branch. Which +would be prohibitively slow when reinjecting many files. (N times git +ls-tree -r) So it would need to build a data structure to map from SHA256 +to known SHA256E key. That can't be stored in memory, git-annex doesn't +let the content of the repo cause it to use arbitrary amounts of memory +(hopefully). + +All I can think of is to traverse the git-annex branch and build a sqlite +database and then query that, but that would add quite a lot of setup +overhead to the command. +"""]]