From: Junio C Hamano Date: Tue, 3 Mar 2026 01:06:52 +0000 (-0800) Subject: Merge branch 'ps/object-info-bits-cleanup' X-Git-Tag: v2.54.0-rc0~141 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=10dd04a3feef385358d66bf3d653325f64c20d3c;p=thirdparty%2Fgit.git Merge branch 'ps/object-info-bits-cleanup' A couple of bugs in use of flag bits around odb API has been corrected, and the flag bits reordered. * 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()` --- 10dd04a3feef385358d66bf3d653325f64c20d3c 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,