diff options
| author | Patrick Steinhardt <ps@pks.im> | 2026-04-01 01:57:49 +0200 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-03-31 20:43:13 -0700 |
| commit | b2d421ece6a8e095394e76930e6929ee036571ef (patch) | |
| tree | 4b7f500ceba34c3893fee7db8543c7ad6c011d0b /odb.h | |
| parent | ff2e9d85d61f2f51793acbdb4bad68d48cc8bb85 (diff) | |
| download | git-b2d421ece6a8e095394e76930e6929ee036571ef.tar.xz | |
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 <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'odb.h')
| -rw-r--r-- | odb.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -561,7 +561,7 @@ int odb_find_abbrev_len(struct object_database *odb, int min_len, unsigned *out); -enum { +enum odb_write_object_flags { /* * By default, `odb_write_object()` does not actually write anything * into the object store, but only computes the object ID. This flag @@ -589,7 +589,7 @@ int odb_write_object_ext(struct object_database *odb, enum object_type type, struct object_id *oid, struct object_id *compat_oid, - unsigned flags); + enum odb_write_object_flags flags); static inline int odb_write_object(struct object_database *odb, const void *buf, unsigned long len, |
