csum-file.h: remove unnecessary inclusion of cache.h
With the change in the last commit to move several functions to write-or-die.h, csum-file.h no longer needs to include cache.h. However, removing that include forces several other C files, which directly or indirectly dependend upon csum-file.h's inclusion of cache.h, to now be more explicit about their dependencies. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Elijah Newren committed
Mar 21, 2023 at 06:26 UTC
ec2f02696157d3781fbfd410f0017c49cc1eda01
12 files changed
+13
-10
bulk-checkin.c
+1
-1
index eb6d7a2805..d2428b8611 100644
--- a/bulk-checkin.c
+++ b/bulk-checkin.c
@@ -1,7 +1,7 @@
/*
* Copyright (c) 2011, Google Inc.
*/
-#include "git-compat-util.h"
+#include "cache.h"
#include "alloc.h"
#include "bulk-checkin.h"
#include "environment.h"
chunk-format.c
+1
index 6d1071729d..60a73c1b14 100644
--- a/chunk-format.c
+++ b/chunk-format.c
@@ -3,6 +3,7 @@
#include "chunk-format.h"
#include "csum-file.h"
#include "gettext.h"
+#include "trace2.h"
/*
* When writing a chunk-based file format, collect the chunks in
commit-graph.c
+1
-1
index 5481736c76..f0cd2e7a2a 100644
--- a/commit-graph.c
+++ b/commit-graph.c
@@ -1,4 +1,4 @@
-#include "git-compat-util.h"
+#include "cache.h"
#include "config.h"
#include "gettext.h"
#include "hex.h"
csum-file.h
-1
index 4cd9014e36..566e05cbd2 100644
--- a/csum-file.h
+++ b/csum-file.h
@@ -1,7 +1,6 @@
#ifndef CSUM_FILE_H
#define CSUM_FILE_H
-#include "cache.h"
#include "hash.h"
#include "write-or-die.h"
delta-islands.c
+1
-1
index 1222b6a6cd..73a01179e8 100644
--- a/delta-islands.c
+++ b/delta-islands.c
@@ -1,4 +1,4 @@
-#include "git-compat-util.h"
+#include "cache.h"
#include "alloc.h"
#include "attr.h"
#include "object.h"
fetch-pack.c
+1
-1
index c453a4168f..10f759532c 100644
--- a/fetch-pack.c
+++ b/fetch-pack.c
@@ -1,4 +1,4 @@
-#include "git-compat-util.h"
+#include "cache.h"
#include "alloc.h"
#include "repository.h"
#include "config.h"
midx.c
+1
-1
index b111665dca..9af3e5de88 100644
--- a/midx.c
+++ b/midx.c
@@ -1,4 +1,4 @@
-#include "git-compat-util.h"
+#include "cache.h"
#include "abspath.h"
#include "alloc.h"
#include "config.h"
object-file.c
+1
-1
index 05fff230f7..397596e3c8 100644
--- a/object-file.c
+++ b/object-file.c
@@ -6,7 +6,7 @@
* This handles basic git object files - packing, unpacking,
* creation etc.
*/
-#include "git-compat-util.h"
+#include "cache.h"
#include "abspath.h"
#include "alloc.h"
#include "config.h"
pack-bitmap-write.c
+2
-1
index 63f16080c9..0fddeb1298 100644
--- a/pack-bitmap-write.c
+++ b/pack-bitmap-write.c
@@ -1,4 +1,4 @@
-#include "git-compat-util.h"
+#include "cache.h"
#include "alloc.h"
#include "environment.h"
#include "gettext.h"
@@ -17,6 +17,7 @@
#include "pack-objects.h"
#include "commit-reach.h"
#include "prio-queue.h"
+#include "trace2.h"
struct bitmapped_commit {
struct commit *commit;
pack-bitmap.c
+1
-1
index 241ac9166c..23d87e71bd 100644
--- a/pack-bitmap.c
+++ b/pack-bitmap.c
@@ -1,4 +1,4 @@
-#include "git-compat-util.h"
+#include "cache.h"
#include "alloc.h"
#include "commit.h"
#include "gettext.h"
pack.h
+2
index 01d385903a..3ab9e3f60c 100644
--- a/pack.h
+++ b/pack.h
@@ -4,6 +4,8 @@
#include "object.h"
#include "csum-file.h"
+struct packed_git;
+struct pack_window;
struct repository;
/*
packfile.c
+1
-1
index 4b5b841d04..61672d50bd 100644
--- a/packfile.c
+++ b/packfile.c
@@ -1,4 +1,4 @@
-#include "git-compat-util.h"
+#include "cache.h"
#include "alloc.h"
#include "environment.h"
#include "gettext.h"