diff options
author | Elijah Newren <newren@gmail.com> | 2023-03-21 07:26:02 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-03-21 18:56:53 +0100 |
commit | a64acf7298e87740a596123d2b39fefe623fd46f (patch) | |
tree | 7ed6bda75bba4ba467d90fd741100ba5202674fc /tempfile.c | |
parent | wrapper.h: move declarations for wrapper.c functions from cache.h (diff) | |
download | git-a64acf7298e87740a596123d2b39fefe623fd46f.tar.xz git-a64acf7298e87740a596123d2b39fefe623fd46f.zip |
treewide: remove unnecessary includes of cache.h
The last several commits were geared at replacing the include of cache.h
in strbuf.c with an include of git-compat-util.h. Unfortunately, I had
to drop a patch moving some functions from cache.h to object-name.h, due
to excessive conflicts with other in-flight topics.
However, even without that patch, the series of patches so far allows us
to modify a number of C files to replace an include of cache.h with
git-compat-util.h. Do that to reduce our dependencies.
(If we could have kept our object-name.h patch in this series, it would
have also let us reduce the includes in checkout.c and fmt-merge-msg.c
in addition to strbuf.c).
Just to ensure that nothing else was bringing in cache.h, all of the
affected files have been checked to ensure that
gcc -E -I. $SOURCE_FILE | grep '"cache.h"'
found no hits and that
make DEVELOPER=1 ${OBJECT_FILE_FOR_SOURCE_FILE}
successfully compiles without warnings.
Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'tempfile.c')
-rw-r--r-- | tempfile.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tempfile.c b/tempfile.c index cdd2cab3ba..50c377134c 100644 --- a/tempfile.c +++ b/tempfile.c @@ -42,7 +42,8 @@ * file created by its parent. */ -#include "cache.h" +#include "git-compat-util.h" +#include "path.h" #include "tempfile.h" #include "sigchain.h" #include "wrapper.h" |