1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-04-20 01:43:54 +02:00

treewide: remove unnecessary cache.h includes

We had several header files include cache.h unnecessarily.  Remove
those.  These have all been verified via both ensuring that
    gcc -E $HEADER | grep '"cache.h"'
found no hits and that
    cat >temp.c <<EOF &&
    #include "git-compat-util.h"
    #include "$HEADER"
    int main() {}
    EOF
    gcc -c temp.c
successfully compiles without warnings.

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-02-24 00:09:22 +00:00 committed by Junio C Hamano
parent f332121e75
commit ba3d1c73da
10 changed files with 7 additions and 11 deletions

View File

@ -1,7 +1,7 @@
#ifndef CHECKOUT_H
#define CHECKOUT_H
#include "cache.h"
#include "hash.h"
/*
* Check if the branch name uniquely matches a branch name on a remote

View File

@ -1,9 +1,11 @@
#ifndef ENTRY_H
#define ENTRY_H
#include "cache.h"
#include "convert.h"
struct cache_entry;
struct index_state;
struct checkout {
struct index_state *istate;
const char *base_dir;

View File

@ -26,7 +26,6 @@
#ifndef __AC_KHASH_H
#define __AC_KHASH_H
#include "cache.h"
#include "hashmap.h"
#define AC_VERSION_KHASH_H "0.2.8"

View File

@ -1,7 +1,6 @@
#ifndef OIDMAP_H
#define OIDMAP_H
#include "cache.h"
#include "hashmap.h"
/*

View File

@ -1,11 +1,11 @@
#ifndef PRETTY_H
#define PRETTY_H
#include "cache.h"
#include "date.h"
#include "string-list.h"
struct commit;
struct repository;
struct strbuf;
struct process_trailer_options;

View File

@ -1,8 +1,6 @@
#ifndef REFLOG_WALK_H
#define REFLOG_WALK_H
#include "cache.h"
struct commit;
struct reflog_walk_info;
struct date_mode;

View File

@ -1,7 +1,6 @@
#ifndef REFS_REFS_INTERNAL_H
#define REFS_REFS_INTERNAL_H
#include "cache.h"
#include "refs.h"
#include "iterator.h"

View File

@ -1,7 +1,6 @@
#ifndef REMOTE_H
#define REMOTE_H
#include "cache.h"
#include "parse-options.h"
#include "hashmap.h"
#include "refspec.h"

View File

@ -1,11 +1,11 @@
#ifndef SEQUENCER_H
#define SEQUENCER_H
#include "cache.h"
#include "strbuf.h"
#include "wt-status.h"
struct commit;
struct index_state;
struct repository;
const char *git_path_commit_editmsg(void);

View File

@ -1,7 +1,7 @@
#ifndef XDIFF_INTERFACE_H
#define XDIFF_INTERFACE_H
#include "cache.h"
#include "hash.h"
#include "xdiff/xdiff.h"
/*