summaryrefslogtreecommitdiff
path: root/http-fetch.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-09-16 18:06:02 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-09-16 18:06:02 (GMT)
commit4adffc7b54e8c5d8fc7510007dd9b8235a67430f (patch)
tree94c94c74022ba797c8fc6f26c3298e3729ee5820 /http-fetch.c
parentbe4a015b0fed2bd96e509f45b80b63db056b9ca9 (diff)
downloadgit-4adffc7b54e8c5d8fc7510007dd9b8235a67430f.zip
git-4adffc7b54e8c5d8fc7510007dd9b8235a67430f.tar.gz
git-4adffc7b54e8c5d8fc7510007dd9b8235a67430f.tar.bz2
Add ftp:// protocol support for git-http-fetch
Based on Sasha Khapyorsky's patch but adjusted to the refactored "missing target" detection code. It might have been better if the program were called git-url-fetch but it is too late now ;-). Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'http-fetch.c')
-rw-r--r--http-fetch.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/http-fetch.c b/http-fetch.c
index 98cf52d..bc74f30 100644
--- a/http-fetch.c
+++ b/http-fetch.c
@@ -149,7 +149,9 @@ static int missing__target(int code, int result)
return /* file:// URL -- do we ever use one??? */
(result == CURLE_FILE_COULDNT_READ_FILE) ||
/* http:// and https:// URL */
- (code == 404 && result == CURLE_HTTP_RETURNED_ERROR)
+ (code == 404 && result == CURLE_HTTP_RETURNED_ERROR) ||
+ /* ftp:// URL */
+ (code == 550 && result == CURLE_FTP_COULDNT_RETR_FILE)
;
}