summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-06-10 14:11:39 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-06-10 14:11:39 -0400
commit9eaae6806c6856589a5364cc22dd63523f7e0fd0 (patch)
tree0cddaa088faf4c179a82a2a6aff85b57fbd6424e
parentdf9f68b38d6694fba93b677ca5fbd8c2b75a8fe2 (diff)
todo item (seems blocked on caching database)
-rw-r--r--doc/todo/cloning_direct_mode_repo_over_http.mdwn35
1 files changed, 35 insertions, 0 deletions
diff --git a/doc/todo/cloning_direct_mode_repo_over_http.mdwn b/doc/todo/cloning_direct_mode_repo_over_http.mdwn
new file mode 100644
index 000000000..947bf1e24
--- /dev/null
+++ b/doc/todo/cloning_direct_mode_repo_over_http.mdwn
@@ -0,0 +1,35 @@
+Indirect mode repos can be cloned over http, and just work. But, direct
+mode repos don't currently work; while git can clone them ok, git-annex get
+doesn't know where to get the file contents from.
+
+To support this, git-annex would have to check if the remote is in direct
+mode, and when it is, it would need to download the direct mode mapping
+file, to find out which file has the content of a key. Then, after
+downloading the a file, it would need to make sure to checksum it, since
+nothing prevents a direct mode file from being modified at the same time
+it's downloaded.
+
+All seems doable. However.. [[design/caching_database]] wants to switch the
+direct mode mapping files from simple flat text files to a sqlite database.
+Which would complicate this a lot. Can sqlite databases be accessed over
+http, or would the whole, possibly large database need to be downloaded?
+If so, what to do when the database changes? Re-downloading a possibly
+large db is not good.
+
+---
+
+Alternatively, the direct mode mapping files of the remote could be
+bypassed. Instead, look at what the remote HEAD branch is, and look at that
+branch locally. Create local direct mode mappings for the remote HEAD
+branch, and use them when downloading.
+
+This approach would mean that, if the remote's HEAD changes and we haven't
+noticed, we might download the wrong file (that has eg, been moved).
+checksumming would detect this, but it does make it more fragile.
+
+Also, creating the direct mode mappings for a remote HEAD would currently
+be pretty slow. Probably implementing the caching database for direct mode
+mappings would lead to faster code. So, this feature seems best blocked on
+the direct mode database either way!
+
+--[[Joey]]