summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElijah Newren <newren@gmail.com>2023-03-21 06:26:08 (GMT)
committerJunio C Hamano <gitster@pobox.com>2023-03-21 17:56:55 (GMT)
commitec2f02696157d3781fbfd410f0017c49cc1eda01 (patch)
tree4fdabe7153677a2ff5cb361ad0d32f6f1a525a73
parentd48be35ca6f62e1ddd0161f9bbb4c893ee498bfe (diff)
downloadgit-ec2f02696157d3781fbfd410f0017c49cc1eda01.zip
git-ec2f02696157d3781fbfd410f0017c49cc1eda01.tar.gz
git-ec2f02696157d3781fbfd410f0017c49cc1eda01.tar.bz2
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>
-rw-r--r--bulk-checkin.c2
-rw-r--r--chunk-format.c1
-rw-r--r--commit-graph.c2
-rw-r--r--csum-file.h1
-rw-r--r--delta-islands.c2
-rw-r--r--fetch-pack.c2
-rw-r--r--midx.c2
-rw-r--r--object-file.c2
-rw-r--r--pack-bitmap-write.c3
-rw-r--r--pack-bitmap.c2
-rw-r--r--pack.h2
-rw-r--r--packfile.c2
12 files changed, 13 insertions, 10 deletions
diff --git a/bulk-checkin.c b/bulk-checkin.c
index eb6d7a2..d2428b8 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"
diff --git a/chunk-format.c b/chunk-format.c
index 6d10717..60a73c1 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
diff --git a/commit-graph.c b/commit-graph.c
index 5481736..f0cd2e7 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"
diff --git a/csum-file.h b/csum-file.h
index 4cd9014..566e05c 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"
diff --git a/delta-islands.c b/delta-islands.c
index 1222b6a..73a0117 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"
diff --git a/fetch-pack.c b/fetch-pack.c
index c453a41..10f7595 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"
diff --git a/midx.c b/midx.c
index b111665..9af3e5d 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"
diff --git a/object-file.c b/object-file.c
index 05fff23..397596e 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"
diff --git a/pack-bitmap-write.c b/pack-bitmap-write.c
index 63f1608..0fddeb1 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;
diff --git a/pack-bitmap.c b/pack-bitmap.c
index 241ac91..23d87e7 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"
diff --git a/pack.h b/pack.h
index 01d3859..3ab9e3f 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;
/*
diff --git a/packfile.c b/packfile.c
index 4b5b841..61672d5 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"