]> git.ipfire.org Git - thirdparty/git.git/commit
http-walker: use object_id instead of bare hash
authorJeff King <peff@peff.net>
Fri, 25 Oct 2024 07:03:42 +0000 (03:03 -0400)
committerTaylor Blau <me@ttaylorr.com>
Fri, 25 Oct 2024 21:35:46 +0000 (17:35 -0400)
commit0af861e0c8d7b7c6135bfc688be13370ac2c9468
tree860562879ac792faf3149a7b269da3971d1e23e6
parent6b2fc22050227e102af692af28c98925c18c6cc1
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>
http-walker.c
walker.c
walker.h