mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
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>
This commit is contained in:
4
walker.h
4
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;
|
||||
|
||||
Reference in New Issue
Block a user