]> git.ipfire.org Git - thirdparty/git.git/commit
object-file: inline calls to read_object()
authorJeff King <peff@peff.net>
Sat, 7 Jan 2023 13:48:55 +0000 (08:48 -0500)
committerJunio C Hamano <gitster@pobox.com>
Sun, 8 Jan 2023 01:52:54 +0000 (10:52 +0900)
commitb25562e63fe8afaf0f103362a4e672e9ccdc2d68
tree64820cb1014bf61e2e31fc23cee7818664d2d8ad
parent4dbebc36b0893f5094668ddea077d0e235560b16
object-file: inline calls to read_object()

Since read_object() is these days just a thin wrapper around
oid_object_info_extended(), and since it only has two callers, let's
just inline those calls. This has a few positive outcomes:

  - it's a net reduction in source code lines

  - even though the callers end up with a few extra lines, they're now
    more flexible and can use object_info flags directly. So no more
    need to convert die_if_corrupt between parameter/flag, and we can
    ask for lookup replacement with a flag rather than doing it
    ourselves.

  - there's one fewer function in an already crowded namespace (e.g.,
    the difference between read_object() and read_object_file() was not
    immediately obvious; now we only have one of them).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
object-file.c
object-store.h