Re: [PATCH v2 1/7] refs: drop unnecessary header includes
- From
SZEDER Gábor <szeder.dev@gmail.com>
- Date
- Jan 18, 2026, 12:07 UTC
- Message-ID
- <aWzM+qePiaRWz5/f@szeder.dev>
- In-Reply-To
- <20260116-633-regression-lost-diagnostic-message-when-pushing-non-commit-objects-to-refs-heads-v2-1-925a0e9c7f32@gmail.com>
On Fri, Jan 16, 2026 at 10:27:06PM +0100, Karthik Nayak wrote:
> The 'sigchain.h' header isn't being used and can be removed. > > Similarly, 'run-command.h' serves no direct purpose here. While it gets pulled in transitively through 'hook.h', we can still drop the explicit include for clarity.
The need for these #includes went away fairly recently, I think in 26238496a7 (hook: provide stdin via callback, 2025-12-26) and 7a7717427e (reference-transaction: use hook API instead of run-command, 2025-12-26), which were merged in f406b89552 (Merge branch 'ar/run-command-hook', 2026-01-06). Unfortunately, that topic had some regressions and therefore was reverted in a3d1f391d3 (Revert "Merge branch 'ar/run-command-hook'", 2026-01-15), and as a result merging this topic into seen resulted in a merge commit 180b93f7ba (Merge branch 'kn/ref-batch-output-error-reporting-fix' into jch, 2026-01-16) that can't be built.
I think this patch should be dropped from this series, and these #includes should be removed in that other topic.
https://public-inbox.org/git/20251226122334.16687-1-adrian.ratiu@collabora.com/T/#u
Show 29 quoted lines
> Signed-off-by: Karthik Nayak <karthik.188@gmail.com> > --- > refs.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/refs.c b/refs.c > index e06e0cb072..965b232a06 100644 > --- a/refs.c > +++ b/refs.c > @@ -15,7 +15,6 @@ > #include "iterator.h" > #include "refs.h" > #include "refs/refs-internal.h" > -#include "run-command.h" > #include "hook.h" > #include "object-name.h" > #include "odb.h" > @@ -26,7 +25,6 @@ > #include "strvec.h" > #include "repo-settings.h" > #include "setup.h" > -#include "sigchain.h" > #include "date.h" > #include "commit.h" > #include "wildmatch.h" > > -- > 2.51.2 >