* [PATCH] git: remove duplicate includes
@ 2022-12-14 16:52 Rose via GitGitGadget
2022-12-14 20:53 ` Jeff King
0 siblings, 1 reply; 2+ messages in thread
From: Rose via GitGitGadget @ 2022-12-14 16:52 UTC (permalink / raw)
To: git; +Cc: Rose, Seija Kijin
From: Seija Kijin <doremylover123@gmail.com>
These files are already included; we do not need to include them again
Signed-off-by: Seija Kijin <doremylover123@gmail.com>
---
git: remove duplicate includes
These files are already included; we do not need to include them again
Signed-off-by: Seija Kijin doremylover123@gmail.com
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1394%2FAtariDreams%2Finclude-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1394/AtariDreams/include-v1
Pull-Request: https://github.com/git/git/pull/1394
pack-write.c | 1 -
sequencer.c | 1 -
unpack-trees.c | 1 -
3 files changed, 3 deletions(-)
diff --git a/pack-write.c b/pack-write.c
index 00787e306db..33637297487 100644
--- a/pack-write.c
+++ b/pack-write.c
@@ -5,7 +5,6 @@
#include "chunk-format.h"
#include "pack-mtimes.h"
#include "oidmap.h"
-#include "chunk-format.h"
#include "pack-objects.h"
void reset_pack_idx_option(struct pack_idx_option *opts)
diff --git a/sequencer.c b/sequencer.c
index dbd56121e24..bcb662e23be 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -36,7 +36,6 @@
#include "rebase-interactive.h"
#include "reset.h"
#include "branch.h"
-#include "log-tree.h"
#define GIT_REFLOG_ACTION "GIT_REFLOG_ACTION"
diff --git a/unpack-trees.c b/unpack-trees.c
index 8a762aa0772..d11bef96bf3 100644
--- a/unpack-trees.c
+++ b/unpack-trees.c
@@ -19,7 +19,6 @@
#include "promisor-remote.h"
#include "entry.h"
#include "parallel-checkout.h"
-#include "sparse-index.h"
/*
* Error messages expected by scripts out of plumbing commands such as
base-commit: 57e2c6ebbe7108b35ba30184dcbcb6c34c929ad8
--
gitgitgadget
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] git: remove duplicate includes
2022-12-14 16:52 [PATCH] git: remove duplicate includes Rose via GitGitGadget
@ 2022-12-14 20:53 ` Jeff King
0 siblings, 0 replies; 2+ messages in thread
From: Jeff King @ 2022-12-14 20:53 UTC (permalink / raw)
To: Rose via GitGitGadget; +Cc: git, Rose, Seija Kijin
On Wed, Dec 14, 2022 at 04:52:23PM +0000, Rose via GitGitGadget wrote:
> These files are already included; we do not need to include them again
These all look good to me. I'm guessing you found them with something
like:
git grep '^#include' '*.h' '*.c' | sort | uniq -d
and then looking over the output (it has many false positives because
sometimes includes are found in multiple conditionals).
There's one more in compat/regex/regex.h, where we include stddef.h
unconditionally, but also if HAVE_STDDEF_H is defined (which I think
we'd never set ourselves). The conditional bit comes from upstream, I
think, via d18f76dccf (compat/regex: use the regex engine from gawk for
compat, 2010-08-17). The unconditional one is from just after that, in
a997bf423d (compat/regex: get the gawk regex engine to compile within
git, 2010-08-17).
It's probably best to leave it as-is, since the "clean" fix would be to
remove the unused conditional, but that takes us further from upstream,
which would be a pain if we ever want to re-import a new version.
So I think your patch covers all of the cases we'd want to fix.
-Peff
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-12-14 20:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-14 16:52 [PATCH] git: remove duplicate includes Rose via GitGitGadget
2022-12-14 20:53 ` Jeff King
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).