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 --- odb/source.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'odb/source.h') diff --git a/odb/source.h b/odb/source.h index a9d7d0b96f..f706e0608a 100644 --- a/odb/source.h +++ b/odb/source.h @@ -197,7 +197,7 @@ struct odb_source { enum object_type type, struct object_id *oid, struct object_id *compat_oid, - unsigned flags); + enum odb_write_object_flags flags); /* * This callback is expected to persist the given object stream into @@ -405,7 +405,7 @@ static inline int odb_source_write_object(struct odb_source *source, enum object_type type, struct object_id *oid, struct object_id *compat_oid, - unsigned flags) + enum odb_write_object_flags flags) { return source->write_object(source, buf, len, type, oid, compat_oid, flags); -- cgit v1.3