summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 02dc534)
raw | patch | inline | side by side (parent: 02dc534)
author | Mike Hommey <mh@glandium.org> | |
Mon, 10 Dec 2007 21:36:09 +0000 (22:36 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 15 Dec 2007 05:31:59 +0000 (21:31 -0800) |
Signed-off-by: Mike Hommey <mh@glandium.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
http-walker.c | patch | blob | history | |
http.h | patch | blob | history | |
transport.c | patch | blob | history |
diff --git a/http-walker.c b/http-walker.c
index 0faafbce6164b18cdd960bc8c7d254507d4a2731..ad874b98cb5c76ef81a99607dc3630baf7a7f62a 100644 (file)
--- a/http-walker.c
+++ b/http-walker.c
return size;
}
-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) ||
- /* ftp:// URL */
- (code == 550 && result == CURLE_FTP_COULDNT_RETR_FILE)
- ;
-}
-
-#define missing_target(a) missing__target((a)->http_code, (a)->curl_result)
-
static void fetch_alternates(struct walker *walker, const char *base);
static void process_object_response(void *callback_data);
index fe1b0d153bcd80d12a405c26e0f073cbf14dde34..b9d6f4823d4a5318c6b7ac2f3d80bdce46e30d68 100644 (file)
--- a/http.h
+++ b/http.h
extern char curl_errorstr[CURL_ERROR_SIZE];
+static inline 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) ||
+ /* ftp:// URL */
+ (code == 550 && result == CURLE_FTP_COULDNT_RETR_FILE)
+ ;
+}
+
+#define missing_target(a) missing__target((a)->http_code, (a)->curl_result)
+
#endif /* HTTP_H */
diff --git a/transport.c b/transport.c
index 58e66f6c11798dac416941ce5ad3dbae91c31a06..1f840a0498f9fa013c4b10d874525fbca679b2de 100644 (file)
--- a/transport.c
+++ b/transport.c
@@ -426,19 +426,6 @@ static int curl_transport_push(struct transport *transport, int refspec_nr, cons
return !!err;
}
-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) ||
- /* ftp:// URL */
- (code == 550 && result == CURLE_FTP_COULDNT_RETR_FILE)
- ;
-}
-
-#define missing_target(a) missing__target((a)->http_code, (a)->curl_result)
-
static struct ref *get_refs_via_curl(struct transport *transport)
{
struct buffer buffer;