summaryrefslogtreecommitdiff
path: root/http-walker.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2019-01-07 03:37:54 -0500
committerJunio C Hamano <gitster@pobox.com>2019-01-08 09:41:06 -0800
commit98374a07c98d1acc200c423b87495365a59cce0b (patch)
tree5d13cd44abc62bd17672bd00a7e8c28a198f5346 /http-walker.c
parentd7a245730b4397e50592e1f4ebce765f7fbf5f93 (diff)
downloadgit-98374a07c98d1acc200c423b87495365a59cce0b.tar.gz
convert has_sha1_file() callers to has_object_file()
The only remaining callers of has_sha1_file() actually have an object_id already. They can use the "object" variant, rather than dereferencing the hash themselves. The code changes here were completely generated by the included coccinelle patch. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'http-walker.c')
-rw-r--r--http-walker.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/http-walker.c b/http-walker.c
index 29b59e2fe0..8ae5d76c6a 100644
--- a/http-walker.c
+++ b/http-walker.c
@@ -131,7 +131,7 @@ static int fill_active_slot(struct walker *walker)
list_for_each_safe(pos, tmp, head) {
obj_req = list_entry(pos, struct object_request, node);
if (obj_req->state == WAITING) {
- if (has_sha1_file(obj_req->oid.hash))
+ if (has_object_file(&obj_req->oid))
obj_req->state = COMPLETE;
else {
start_object_request(walker, obj_req);
@@ -489,7 +489,7 @@ static int fetch_object(struct walker *walker, unsigned char *sha1)
if (obj_req == NULL)
return error("Couldn't find request for %s in the queue", hex);
- if (has_sha1_file(obj_req->oid.hash)) {
+ if (has_object_file(&obj_req->oid)) {
if (obj_req->req != NULL)
abort_http_object_request(obj_req->req);
abort_object_request(obj_req);