treewide: remove unnecessary cache.h inclusion from a few headers

Ever since a64215b6cd ("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 <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Elijah Newren 2023-03-21 06:25:53 +00:00 committed by Junio C Hamano
parent e25cabbf6b
commit a6dc3d364c
28 changed files with 29 additions and 25 deletions

View File

@ -4,7 +4,7 @@
#ifndef BULK_CHECKIN_H
#define BULK_CHECKIN_H
#include "cache.h"
#include "object.h"
void prepare_loose_object_bulk_checkin(void);
void fsync_loose_object_bulk_checkin(int fd, const char *filename);

View File

@ -2,7 +2,6 @@
#define BUNDLE_H
#include "strvec.h"
#include "cache.h"
#include "string-list.h"
#include "list-objects-filter-options.h"

View File

@ -1,4 +1,4 @@
#include "git-compat-util.h"
#include "cache.h"
#include "alloc.h"
#include "hex.h"
#include "lockfile.h"

View File

@ -5,7 +5,7 @@
* Copyright (C) Johannes Schindelin, 2005
*
*/
#include "git-compat-util.h"
#include "cache.h"
#include "alloc.h"
#include "date.h"
#include "branch.h"

View File

@ -1,4 +1,4 @@
#include "git-compat-util.h"
#include "cache.h"
#include "alloc.h"
#include "config.h"
#include "refs.h"

2
fsck.c
View File

@ -1,4 +1,4 @@
#include "git-compat-util.h"
#include "cache.h"
#include "alloc.h"
#include "hex.h"
#include "object-store.h"

View File

@ -1,4 +1,4 @@
#include "git-compat-util.h"
#include "cache.h"
#include "alloc.h"
#include "config.h"
#include "hex.h"

View File

@ -1,4 +1,4 @@
#include "git-compat-util.h"
#include "cache.h"
#include "pack-mtimes.h"
#include "object-store.h"
#include "packfile.h"

View File

@ -1,11 +1,13 @@
#ifndef PACKFILE_H
#define PACKFILE_H
#include "cache.h"
#include "object.h"
#include "oidset.h"
/* in object-store.h */
struct packed_git;
struct pack_entry;
struct pack_window;
struct object_info;
/*

View File

@ -1,4 +1,4 @@
#include "git-compat-util.h"
#include "cache.h"
#include "object-store.h"
#include "packfile.h"
#include "progress.h"

View File

@ -1,4 +1,4 @@
#include "git-compat-util.h"
#include "cache.h"
#include "alloc.h"
#include "hex.h"
#include "parse-options.h"

2
refs.c
View File

@ -2,7 +2,7 @@
* The backend-independent part of the reference module.
*/
#include "git-compat-util.h"
#include "cache.h"
#include "alloc.h"
#include "config.h"
#include "hashmap.h"

1
refs.h
View File

@ -1,7 +1,6 @@
#ifndef REFS_H
#define REFS_H
#include "cache.h"
#include "commit.h"
struct object_id;

View File

@ -1,4 +1,4 @@
#include "../git-compat-util.h"
#include "../cache.h"
#include "../alloc.h"
#include "../config.h"
#include "../hex.h"

View File

@ -1,5 +1,6 @@
#include "git-compat-util.h"
#include "alloc.h"
#include "gettext.h"
#include "hex.h"
#include "strvec.h"
#include "refs.h"

View File

@ -1,4 +1,4 @@
#include "git-compat-util.h"
#include "cache.h"
#include "alloc.h"
#include "config.h"
#include "hex.h"

View File

@ -1,4 +1,4 @@
#include "git-compat-util.h"
#include "cache.h"
#include "alloc.h"
#include "dir.h"
#include "hex.h"

View File

@ -1,4 +1,4 @@
#include "git-compat-util.h"
#include "cache.h"
#include "alloc.h"
#include "hex.h"
#include "repository.h"

View File

@ -1,4 +1,4 @@
#include "git-compat-util.h"
#include "cache.h"
#include "alloc.h"
#include "hex.h"
#include "refs.h"

View File

@ -3,10 +3,12 @@
*/
#ifndef STREAMING_H
#define STREAMING_H 1
#include "cache.h"
#include "object.h"
/* opaque */
struct git_istream;
struct stream_filter;
struct git_istream *open_istream(struct repository *, const struct object_id *,
enum object_type *, unsigned long *,

View File

@ -1,4 +1,4 @@
#include "git-compat-util.h"
#include "cache.h"
#include "alloc.h"
#include "repository.h"
#include "config.h"

View File

@ -1,6 +1,7 @@
#include "test-tool.h"
#include "parse-options.h"
#include "bundle-uri.h"
#include "gettext.h"
#include "strbuf.h"
#include "string-list.h"
#include "transport.h"

View File

@ -12,7 +12,7 @@
#define USE_THE_INDEX_VARIABLE
#include "test-tool.h"
#include "cache.h"
#include "cache-tree.h"
#include "commit.h"
#include "hex.h"

View File

@ -1,5 +1,5 @@
#include "git-compat-util.h"
#include "test-tool.h"
#include "cache.h"
#include "hex.h"
#include "strbuf.h"
#include "object-store.h"

View File

@ -1,4 +1,5 @@
#include "test-tool.h"
#include "cache.h"
#include "alloc.h"
#include "commit.h"
#include "commit-reach.h"

View File

@ -1,4 +1,4 @@
#include "git-compat-util.h"
#include "cache.h"
#include "alloc.h"
#include "config.h"
#include "hex.h"

View File

@ -1,7 +1,6 @@
#ifndef TRANSPORT_H
#define TRANSPORT_H
#include "cache.h"
#include "run-command.h"
#include "remote.h"
#include "list-objects-filter-options.h"

View File

@ -1,4 +1,4 @@
#include "git-compat-util.h"
#include "cache.h"
#include "alloc.h"
#include "repository.h"
#include "refs.h"