diff options
author | Joey Hess <joeyh@joeyh.name> | 2017-12-11 14:20:12 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2017-12-11 14:20:12 -0400 |
commit | 433a569b49adb3aa772a01b4f2672eb1b3f0a42d (patch) | |
tree | 2239764ea027abc46c725468aefa331976f30b32 /doc | |
parent | 2638d46412666e3cfcb6a042ef8d5e0f9ee018db (diff) |
followup
Diffstat (limited to 'doc')
-rw-r--r-- | doc/forum/Adding_a_URL_from_wayback_machine/comment_3_aefbb393c11ab233d145311409d405c7._comment | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/doc/forum/Adding_a_URL_from_wayback_machine/comment_3_aefbb393c11ab233d145311409d405c7._comment b/doc/forum/Adding_a_URL_from_wayback_machine/comment_3_aefbb393c11ab233d145311409d405c7._comment new file mode 100644 index 000000000..1711ccb91 --- /dev/null +++ b/doc/forum/Adding_a_URL_from_wayback_machine/comment_3_aefbb393c11ab233d145311409d405c7._comment @@ -0,0 +1,31 @@ +[[!comment format=mdwn + username="joey" + subject="""comment 3""" + date="2017-12-11T17:56:53Z" + content=""" +Ah, gotcha. + +When adding an url to an annexed file, git-annex doesn't download the +content again, because that could be a lot of work, instead it checks +if the size is the same, which is the same check that git-annex always uses +to see if the web still seems to have the content of a file. + +It doesn't feel safe to relax the size check when the web server doesn't +send a Content-Length, because then there's no indication at all +that this url really has the same content as the file. It *might* make +sense for git-annex to download all the content again in that case, and +check if it's the expected content and only then add it. However, that +could be a whole lot of unwanted work to do. + +If the user is sure that the url has the same content, it does make sense +for them to add --relaxed. So, perhaps what's needed is a --strict +for the users who are not sure and want to force a full download to check. + +Here's how to check it yourself, without any changes to git-annex. + + wget -O tmp.git-annex_views_demo.ogg http://web.archive.org/web/20171117120847/https://downloads.kitenet.net/videos/git-annex/git-annex_views_demo.ogg + if [ "$(git annex calckey tmp.git-annex_views_demo.ogg)" == "$(git annex find --format '${key}' git-annex_views_demo.ogg)" ]; then + git annex addurl \"http://web.archive.org/web/20171117120847/https://downloads.kitenet.net/videos/git-annex/git-annex_views_demo.ogg\" --file git-annex_views_demo.ogg --relaxed + fi + rm tmp.git-annex_views_demo.ogg +"""]] |