Skip to content

Commit a6dc3d3

Browse files
newrengitster
authored andcommitted
treewide: remove unnecessary cache.h inclusion from a few headers
Ever since a64215b ("object.h: stop depending on cache.h; make cache.h depend on object.h", 2023-02-24), we have a few headers that could have replaced their include of cache.h with an include of object.h. Make that change now. Some C files had to start including cache.h after this change (or some smaller header it had brought in), because the C files were depending on things from cache.h but were only formerly implicitly getting cache.h through one of these headers being modified in this patch. Signed-off-by: Elijah Newren <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent e25cabb commit a6dc3d3

28 files changed

+29
-25
lines changed

bulk-checkin.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#ifndef BULK_CHECKIN_H
55
#define BULK_CHECKIN_H
66

7-
#include "cache.h"
7+
#include "object.h"
88

99
void prepare_loose_object_bulk_checkin(void);
1010
void fsync_loose_object_bulk_checkin(int fd, const char *filename);

bundle.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#define BUNDLE_H
33

44
#include "strvec.h"
5-
#include "cache.h"
65
#include "string-list.h"
76
#include "list-objects-filter-options.h"
87

cache-tree.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "git-compat-util.h"
1+
#include "cache.h"
22
#include "alloc.h"
33
#include "hex.h"
44
#include "lockfile.h"

config.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* Copyright (C) Johannes Schindelin, 2005
66
*
77
*/
8-
#include "git-compat-util.h"
8+
#include "cache.h"
99
#include "alloc.h"
1010
#include "date.h"
1111
#include "branch.h"

fmt-merge-msg.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "git-compat-util.h"
1+
#include "cache.h"
22
#include "alloc.h"
33
#include "config.h"
44
#include "refs.h"

fsck.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "git-compat-util.h"
1+
#include "cache.h"
22
#include "alloc.h"
33
#include "hex.h"
44
#include "object-store.h"

http-backend.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "git-compat-util.h"
1+
#include "cache.h"
22
#include "alloc.h"
33
#include "config.h"
44
#include "hex.h"

pack-mtimes.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "git-compat-util.h"
1+
#include "cache.h"
22
#include "pack-mtimes.h"
33
#include "object-store.h"
44
#include "packfile.h"

packfile.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
#ifndef PACKFILE_H
22
#define PACKFILE_H
33

4-
#include "cache.h"
4+
#include "object.h"
55
#include "oidset.h"
66

77
/* in object-store.h */
88
struct packed_git;
9+
struct pack_entry;
10+
struct pack_window;
911
struct object_info;
1012

1113
/*

prune-packed.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "git-compat-util.h"
1+
#include "cache.h"
22
#include "object-store.h"
33
#include "packfile.h"
44
#include "progress.h"

0 commit comments

Comments
 (0)