Re: [PATCH 1/5] revision: include object-name.h
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 17, 2026, 21:52 UTC
- Message-ID
- <xmqq341yjf8g.fsf@gitster.g>
- In-Reply-To
- <fda0239103f6e2b9e76403144b9ed2e9205e1c2a.1773707361.git.gitgitgadget@gmail.com>
"Derrick Stolee via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 23 quoted lines
> From: Derrick Stolee <stolee@gmail.com> > > The REV_INFO_INIT macro includes a use of the DEFAULT_ABBREV macro, which is > defined in object-name.h. Include it in revision.h so consumers of > REV_INFO_INIT do not need to include this hidden dependency. > > Signed-off-by: Derrick Stolee <stolee@gmail.com> > --- > revision.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/revision.h b/revision.h > index b36acfc2d9..18c9bbd822 100644 > --- a/revision.h > +++ b/revision.h > @@ -4,6 +4,7 @@ > #include "commit.h" > #include "grep.h" > #include "notes.h" > +#include "object-name.h" > #include "oidset.h" > #include "pretty.h" > #include "diff.h"
OK. Other symbols REV_INFO_INIT needs are REV_SORT_IN_GRAPH_ORDER (in <commit.h>), CMIT_FMT_DEFAULT (in <pretty.h>), and STRVEC_INIT (in <strvec.h>), and all three are already included there.
Makes sense.