path: root/http.h
diff options
authorJeff King <>2019-01-07 08:34:40 (GMT)
committerJunio C Hamano <>2019-01-08 17:40:19 (GMT)
commitf0be0db13dbd2d96d2240374e0e9cb106bf6a614 (patch)
tree147863f80da336ff3108e84d1e5c4b37a167cb97 /http.h
parentc93206b412dade4e480588ad5902f4b950d908ab (diff)
http: use struct object_id instead of bare sha1
The dumb-http walker code still passes around and stores object ids as "unsigned char *sha1". Let's modernize it. There's probably still more work to be done to handle dumb-http fetches with a new, larger hash. But that can wait; this is enough that we can now convert some of the low-level object routines that we call into from here (and in fact, some of the "oid.hash" references added here will be further improved in the next patch). Signed-off-by: Jeff King <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'http.h')
1 files changed, 3 insertions, 3 deletions
diff --git a/http.h b/http.h
index d305ca1..66c52b2 100644
--- a/http.h
+++ b/http.h
@@ -224,8 +224,8 @@ struct http_object_request {
CURLcode curl_result;
char errorstr[CURL_ERROR_SIZE];
long http_code;
- unsigned char sha1[20];
- unsigned char real_sha1[20];
+ struct object_id oid;
+ struct object_id real_oid;
git_SHA_CTX c;
git_zstream stream;
int zret;
@@ -234,7 +234,7 @@ struct http_object_request {
extern struct http_object_request *new_http_object_request(
- const char *base_url, unsigned char *sha1);
+ const char *base_url, const struct object_id *oid);
extern void process_http_object_request(struct http_object_request *freq);
extern int finish_http_object_request(struct http_object_request *freq);
extern void abort_http_object_request(struct http_object_request *freq);