aboutsummaryrefslogtreecommitdiff
path: root/walker.h
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2024-10-25 03:03:42 -0400
committerTaylor Blau <me@ttaylorr.com>2024-10-25 17:35:46 -0400
commit0af861e0c8d7b7c6135bfc688be13370ac2c9468 (patch)
tree860562879ac792faf3149a7b269da3971d1e23e6 /walker.h
parent6b2fc22050227e102af692af28c98925c18c6cc1 (diff)
downloadgit-0af861e0c8d7b7c6135bfc688be13370ac2c9468.tar.xz
http-walker: use object_id instead of bare hash
We long ago switched most code to using object_id structs instead of bare "unsigned char *" hashes. This gives us more type safety from the compiler, and generally makes it easier to understand what we expect in each parameter. But the dumb-http code has lagged behind. And indeed, the whole "walker" subsystem interface has the same problem, though http-walker is the only user left. So let's update the walker interface to pass object_id structs (which we already have anyway at all call sites!), and likewise use those within the http-walker methods that it calls. This cleans up the dumb-http code a bit, but will also let us fix a few more commonly used helper functions. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Taylor Blau <me@ttaylorr.com>
Diffstat (limited to 'walker.h')
-rw-r--r--walker.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/walker.h b/walker.h
index d40b016bab..25aaa3631c 100644
--- a/walker.h
+++ b/walker.h
@@ -6,8 +6,8 @@
struct walker {
void *data;
int (*fetch_ref)(struct walker *, struct ref *ref);
- void (*prefetch)(struct walker *, unsigned char *sha1);
- int (*fetch)(struct walker *, unsigned char *sha1);
+ void (*prefetch)(struct walker *, const struct object_id *oid);
+ int (*fetch)(struct walker *, const struct object_id *oid);
void (*cleanup)(struct walker *);
int get_verbosely;
int get_progress;