From b2d421ece6a8e095394e76930e6929ee036571ef Mon Sep 17 00:00:00 2001 From: Patrick Steinhardt Date: Wed, 1 Apr 2026 01:57:49 +0200 Subject: odb: use enum for `odb_write_object` flags We've got a couple of functions that accept `odb_write_object()` flags, but all of them accept the flags as an `unsigned` integer. In fact, we don't even have an `enum` for the flags field. Introduce this `enum` and adapt functions accordingly according to our coding style. Signed-off-by: Patrick Steinhardt Signed-off-by: Junio C Hamano --- object-file.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'object-file.c') diff --git a/object-file.c b/object-file.c index db1a420ab6..2146104de8 100644 --- a/object-file.c +++ b/object-file.c @@ -1169,7 +1169,8 @@ cleanup: int odb_source_loose_write_object(struct odb_source *source, const void *buf, unsigned long len, enum object_type type, struct object_id *oid, - struct object_id *compat_oid_in, unsigned flags) + struct object_id *compat_oid_in, + enum odb_write_object_flags flags) { const struct git_hash_algo *algo = source->odb->repo->hash_algo; const struct git_hash_algo *compat = source->odb->repo->compat_hash_algo; -- cgit v1.3