Browse Source

treewide: remove unnecessary cache.h inclusion from several sources

A number of files were apparently including cache.h solely to get
gettext.h.  By making those files explicitly include gettext.h, we can
already drop the include of cache.h in these files.  On top of that,
there were some files using cache.h that didn't need to for any reason.
Remove these unnecessary includes.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
main
Elijah Newren 1 year ago committed by Junio C Hamano
parent
commit
4f6728d52d
  1. 2
      compat/linux/procinfo.c
  2. 2
      compat/simple-ipc/ipc-shared.c
  3. 2
      connected.c
  4. 2
      grep.c
  5. 2
      negotiator/default.c
  6. 2
      negotiator/skipping.c
  7. 2
      notes-cache.c
  8. 2
      patch-ids.c
  9. 2
      reflog.c
  10. 2
      refs/iterator.c
  11. 2
      replace-object.c
  12. 1
      t/helper/test-hash.c
  13. 2
      xdiff-interface.c

2
compat/linux/procinfo.c

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

#include "strbuf.h"
#include "strvec.h"

2
compat/simple-ipc/ipc-shared.c

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
#include "cache.h"
#include "git-compat-util.h"
#include "simple-ipc.h"
#include "strbuf.h"
#include "pkt-line.h"

2
connected.c

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

2
grep.c

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

2
negotiator/default.c

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
#include "cache.h"
#include "git-compat-util.h"
#include "default.h"
#include "../commit.h"
#include "../fetch-negotiator.h"

2
negotiator/skipping.c

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
#include "cache.h"
#include "git-compat-util.h"
#include "skipping.h"
#include "../commit.h"
#include "../fetch-negotiator.h"

2
notes-cache.c

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

2
patch-ids.c

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
#include "cache.h"
#include "git-compat-util.h"
#include "diff.h"
#include "commit.h"
#include "hash-lookup.h"

2
reflog.c

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

2
refs/iterator.c

@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
* documentation about the design and use of reference iterators.
*/

#include "cache.h"
#include "git-compat-util.h"
#include "refs.h"
#include "refs/refs-internal.h"
#include "iterator.h"

2
replace-object.c

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

1
t/helper/test-hash.c

@ -1,5 +1,4 @@ @@ -1,5 +1,4 @@
#include "test-tool.h"
#include "cache.h"
#include "hex.h"

int cmd_hash_impl(int ac, const char **av, int algo)

2
xdiff-interface.c

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

Loading…
Cancel
Save