summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar http://joeyh.name/ <http://joeyh.name/@web>2014-04-02 19:18:19 +0000
committerGravatar admin <admin@branchable.com>2014-04-02 19:18:19 +0000
commit5b2e05076eba0c46f294dd388d1b7124b13e95c4 (patch)
treede2fe53f9968bf960a7d2baf7fab4f39a6989447
parent46d94e128c4ec8719d7078fd026306823f2904a3 (diff)
Added a comment
-rw-r--r--doc/bugs/problem_to_addurl_--file_with_ftp/comment_3_5bba62e1dd4118bcf7e1c990c7009239._comment22
1 files changed, 22 insertions, 0 deletions
diff --git a/doc/bugs/problem_to_addurl_--file_with_ftp/comment_3_5bba62e1dd4118bcf7e1c990c7009239._comment b/doc/bugs/problem_to_addurl_--file_with_ftp/comment_3_5bba62e1dd4118bcf7e1c990c7009239._comment
new file mode 100644
index 000000000..11265f6db
--- /dev/null
+++ b/doc/bugs/problem_to_addurl_--file_with_ftp/comment_3_5bba62e1dd4118bcf7e1c990c7009239._comment
@@ -0,0 +1,22 @@
+[[!comment format=mdwn
+ username="http://joeyh.name/"
+ ip="209.250.56.244"
+ subject="comment 3"
+ date="2014-04-02T19:18:19Z"
+ content="""
+Yes, --relaxed bypasses the code that uses curl to check the file size.
+
+Ok, I have figured out what's going on.
+
+git annex addurl --file foo ftp://host # this succeeds
+
+run the command a second time, and it fails. Why? Because the file is already present in the annex, and you are running addurl in a different mode. In this mode, it is adding a *new* url to the file in the annex. (In this particular case, the new and old url are the same, but it's possible to see this bug in cases where they are not, too.)
+
+As a sanity check, when adding a new url to an existing file, git-annex wants to check that the new url has the same size as the file. Otherwise it surely has different content. However, as I noted this ftp server is returning a weird 350 response when curl is used to try to get the size of the url. So that fails, and git-annex cannot add the new url to the file. Which would be pointless in this case anyway, since it's the same as the old url.
+
+So, I can fix two things. I can make it detect when the url it's adding to an existing file in the annex is already a known url of that file, and skip doing anything in this case since it would be a no-op anyway. Done that.
+
+And, I can improve the error message so the user is not confused about what they're asking git-annex to do, and why it's unable to. Fixed that.
+
+This leaves the question of why curl sees a 350 code from this ftp server. But since it doesn't cause problems when using addurl, with or without --file to download the file from it, I think it's best to punt on that one.
+"""]]