On 2025-05-22 at 21:53:27, Ramsay Jones wrote: > > > On 22/05/2025 19:55, brian m. carlson wrote: > > diff --git a/reflog-walk.h b/reflog-walk.h > > index 989583dc55..8f0640f662 100644 > > --- a/reflog-walk.h > > +++ b/reflog-walk.h > > @@ -1,9 +1,24 @@ > > #ifndef REFLOG_WALK_H > > #define REFLOG_WALK_H > > > > +#include "git-compat-util.h" > > Why? 'git-compat-util.h' must be #include-d in any compilation > unit before 'reflog-walk.h', so ... One of the CI jobs fails if we don't include `hash.h` for `struct object_id`. I don't remember which one. The rule is that we always include that header before any other header, so that's what I did here. It is also needed for `timestamp_t`. I will also mention that having complete headers makes clangd and other LSPs work better because then they don't warn about undefined types and they can actually warn when we have failed to include the relevant type, and since we actually both headers here, I decided that was the right thing to do. If we're dead set against it, I can remove it. > (Sorry, I have not studied these patches, they were just floating > in front of my eyes ... so, please ignore me if the reason is > obvious! :) ). > > ATB, > Ramsay Jones > > > +#include "hash.h" -- brian m. carlson (they/them) Toronto, Ontario, CA
Attachment:
signature.asc
Description: PGP signature