Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx> writes: > Some builtin/*.c commands weren't using the builtin.h header, but > instead manually imported headers like cache.h and commit.h which > builtin.h would include for them. > diff --git a/builtin/fetch-pack.c b/builtin/fetch-pack.c > index dbd8b7b..03abc30 100644 > --- a/builtin/fetch-pack.c > +++ b/builtin/fetch-pack.c > @@ -1,7 +1,6 @@ > -#include "cache.h" > +#include "builtin.h" > #include "refs.h" > #include "pkt-line.h" > -#include "commit.h" > #include "tag.h" > #include "exec_cmd.h" > #include "pack.h" Leveraging the fact that builtin.h includes git-compat-util.h and cache.h is fine and I think strbuf is also generic and pervasive enough to be included in the mix, but in the longer term we would probably want to fix builtin.h not to include it itself does not need, notably commit.h and notes.h. For example, the header currently defines notes related stuff, such as notes_rewrite_cfg parse_combine_notes_fn, etc. Shouldn't they belong to notes.h? And if we lose them, do we still need to include commit.h and notes.h in builtin.h? And when that happens, the inclusion of commit.h needs to come back to this file, I think. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html