summaryrefslogtreecommitdiff
path: root/doc/bugs/feature_request:_addhash.mdwn
diff options
context:
space:
mode:
authorGravatar http://id.clacke.se/ <clacke@web>2013-12-14 03:44:01 +0000
committerGravatar admin <admin@branchable.com>2013-12-14 03:44:01 +0000
commit8cd753e5b713fa2aabd16d96786559e0726ac9e2 (patch)
tree5d3f6418bcaf5d1fbfe6b04ef50da6a978e0bd67 /doc/bugs/feature_request:_addhash.mdwn
parent6803b4e7897eb56ee63607a07a342f565ff21abc (diff)
Diffstat (limited to 'doc/bugs/feature_request:_addhash.mdwn')
-rw-r--r--doc/bugs/feature_request:_addhash.mdwn27
1 files changed, 27 insertions, 0 deletions
diff --git a/doc/bugs/feature_request:_addhash.mdwn b/doc/bugs/feature_request:_addhash.mdwn
new file mode 100644
index 000000000..fca74200e
--- /dev/null
+++ b/doc/bugs/feature_request:_addhash.mdwn
@@ -0,0 +1,27 @@
+### Use case 1
+
+I have a big repo using a SHA256E back-end. Along comes a new shiny SKEIN512E back-end and I would like to transition to using that, because it's faster and moves from ridiculously to ludicrously low risk of collisions.
+
+I can set `.gitattributes` to use the new back-end for any new files added, but then I when I import some arbitrary mix of existing and new files to the repo it will not deduplicate any more, it will add all the files under the new hash scheme.
+
+### Use case 2
+
+I have a big repo of files I have added using `addurl --fast`. I download the files, and they are in the repo.
+
+ - I cannot verify later that none of them have been damaged.
+ - If I come across an offline collection of some of the files, I cannot easily get them into the annex by a simple import.
+
+### Workaround
+
+In both these cases, what I can do is unlock (maybe?) or unannex (definitely) all of the files, and then re-add them using the new hash. In both cases this means I now risk having duplicates in various clones of the repo, and would have to clean them up with `drop-unused` -- after first having re-copied them from a repo that has them under the new hash. I also lose the continuity of the history of that object.
+
+In use case 2 I also lose the URLs of the files and would have to re-add them using `addurl`.
+
+... which brings me to the proposed feature.
+
+### addhash
+
+Symmetrical to `addurl`, which in one form can take an existing hashed (or URL-sourced) file and add an URL source to it, `addhash` can take an existing URL-sourced (or hashed) file and add a hash reference to it (given that the file is in the annex so that the hash may be calculated) -- an alias under which it may also be identified, in addition to the existing URL or hash.
+
+ - Any file added to the annex after `addhash` will use the symlink name of the original hash if their hash matches the `addhash`ed one.
+ - An `fsck` run will use one of the available hashes to verify the integrity of the file, maybe according to some internal order of preference, or possibly a configurable one.