From: Junio C Hamano Date: Mon, 23 Feb 2026 21:48:48 +0000 (-0800) Subject: Merge branch 'ps/object-info-bits-cleanup' into ps/odb-sources X-Git-Tag: v2.54.0-rc0~75^2~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b1af291b4adf1c433ad2b79f0390f7d6b516a964;p=thirdparty%2Fgit.git Merge branch 'ps/object-info-bits-cleanup' into ps/odb-sources * ps/object-info-bits-cleanup: odb: convert `odb_has_object()` flags into an enum odb: convert object info flags into an enum odb: drop gaps in object info flag values builtin/fsck: fix flags passed to `odb_has_object()` builtin/backfill: fix flags passed to `odb_has_object()` --- b1af291b4adf1c433ad2b79f0390f7d6b516a964 diff --cc object-file.c index 8d1d8c778e,0ab6c4d4f3..098b0541ab --- a/object-file.c +++ b/object-file.c @@@ -395,11 -412,10 +395,11 @@@ static int parse_loose_header(const cha return 0; } -int odb_source_loose_read_object_info(struct odb_source *source, +static int read_object_info_from_path(struct odb_source *source, + const char *path, const struct object_id *oid, struct object_info *oi, - unsigned flags) + enum object_info_flags flags) { int ret; int fd; @@@ -538,16 -534,6 +538,16 @@@ out return ret; } +int odb_source_loose_read_object_info(struct odb_source *source, + const struct object_id *oid, + struct object_info *oi, - unsigned flags) ++ enum object_info_flags flags) +{ + static struct strbuf buf = STRBUF_INIT; + odb_loose_path(source, &buf, oid); + return read_object_info_from_path(source, buf.buf, oid, oi, flags); +} + static void hash_object_body(const struct git_hash_algo *algo, struct git_hash_ctx *c, const void *buf, unsigned long len, struct object_id *oid,