summaryrefslogtreecommitdiff
path: root/http.h
diff options
context:
space:
mode:
authorTay Ray Chuan <rctay89@gmail.com>2009-06-06 16:43:59 +0800
committerJunio C Hamano <gitster@pobox.com>2009-06-06 11:03:11 -0700
commitb8caac2b8ab6482e7ab59c8ec18f1c3d90e7387d (patch)
tree173bbc81d92dc47a6c7bfac672a12fe53f9deb1d /http.h
parent9af5abd9939585bb588d537085138563922c6abe (diff)
downloadgit-b8caac2b8ab6482e7ab59c8ec18f1c3d90e7387d.tar.gz
http*: add http_get_info_packs
http-push.c and http-walker.c no longer have to use fetch_index or setup_index; they simply need to use http_get_info_packs, a new http method, in their fetch_indices implementations. Move fetch_index() and rename to fetch_pack_index() in http.c; this method is not meant to be used outside of http.c. It invokes end_url_with_slash with base_url; apart from that change, the code is identical. Move setup_index() and rename to fetch_and_setup_pack_index() in http.c; this method is not meant to be used outside of http.c. Do not immediately set ret to 0 in http-walker.c::fetch_indices(); instead do it in the HTTP_MISSING_TARGET case, to make it clear that the HTTP_OK and HTTP_MISSING_TARGET cases both return 0. Signed-off-by: Tay Ray Chuan <rctay89@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'http.h')
-rw-r--r--http.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/http.h b/http.h
index 3d878d5126..180b1c2ae2 100644
--- a/http.h
+++ b/http.h
@@ -146,4 +146,8 @@ int http_error(const char *url, int ret);
extern int http_fetch_ref(const char *base, struct ref *ref);
+/* Helpers for fetching packs */
+extern int http_get_info_packs(const char *base_url,
+ struct packed_git **packs_head);
+
#endif /* HTTP_H */