From 6b0c3121061df6b323f430700e8077b324b5e9dd Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Sun, 22 May 2005 11:54:17 -0700 Subject: [PATCH] Include file cleanups.. Add to the include files handled by "cache.h", and remove extraneous #include directives from various .c files. The rule is that "cache.h" gets all the basic stuff, so that we'll have as few system dependencies as possible. --- cache.h | 1 + commit-tree.c | 2 -- commit.c | 2 -- date.c | 3 --- delta.c | 1 - diff-helper.c | 1 - diff.c | 1 - http-pull.c | 6 ------ local-pull.c | 7 ------- object.c | 2 -- read-cache.c | 1 - rpull.c | 6 ------ sha1_file.c | 2 -- usage.c | 1 - 14 files changed, 1 insertion(+), 35 deletions(-) diff --git a/cache.h b/cache.h index 28e3dbddca..d38d9a848c 100644 --- a/cache.h +++ b/cache.h @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include diff --git a/commit-tree.c b/commit-tree.c index e6f001ea27..e81e530fd4 100644 --- a/commit-tree.c +++ b/commit-tree.c @@ -7,9 +7,7 @@ #include #include -#include #include -#include #define BLOCKING (1ul << 14) diff --git a/commit.c b/commit.c index 3f2235ecf8..b4e000e9c2 100644 --- a/commit.c +++ b/commit.c @@ -1,8 +1,6 @@ #include "tag.h" #include "commit.h" #include "cache.h" -#include -#include const char *commit_type = "commit"; diff --git a/date.c b/date.c index 1f366a67f8..ff922fe4fc 100644 --- a/date.c +++ b/date.c @@ -4,9 +4,6 @@ * Copyright (C) Linus Torvalds, 2005 */ -#include -#include -#include #include #include diff --git a/delta.c b/delta.c index 05ef7fd6e4..b31957a1d3 100644 --- a/delta.c +++ b/delta.c @@ -5,7 +5,6 @@ #include "tag.h" #include "delta.h" #include "cache.h" -#include /* the delta object definition (it can alias any other object) */ struct delta { diff --git a/diff-helper.c b/diff-helper.c index 0bc54a3434..23855759ee 100644 --- a/diff-helper.c +++ b/diff-helper.c @@ -1,7 +1,6 @@ /* * Copyright (C) 2005 Junio C Hamano */ -#include #include "cache.h" #include "strbuf.h" #include "diff.h" diff --git a/diff.c b/diff.c index eb8424e22c..4757547ea0 100644 --- a/diff.c +++ b/diff.c @@ -4,7 +4,6 @@ #include #include #include -#include #include "cache.h" #include "diff.h" #include "diffcore.h" diff --git a/http-pull.c b/http-pull.c index cc62f85f48..ba8585cfd4 100644 --- a/http-pull.c +++ b/http-pull.c @@ -1,11 +1,5 @@ -#include -#include -#include -#include #include "cache.h" #include "commit.h" -#include -#include #include "pull.h" diff --git a/local-pull.c b/local-pull.c index 3a342ab183..10d4ca8905 100644 --- a/local-pull.c +++ b/local-pull.c @@ -1,15 +1,8 @@ /* * Copyright (C) 2005 Junio C Hamano */ -#include -#include -#include -#include -#include #include "cache.h" #include "commit.h" -#include -#include #include "pull.h" static int use_link = 0; diff --git a/object.c b/object.c index deb683076d..d093e17d24 100644 --- a/object.c +++ b/object.c @@ -5,8 +5,6 @@ #include "cache.h" #include "tag.h" #include "delta.h" -#include -#include struct object **objs; int nr_objs; diff --git a/read-cache.c b/read-cache.c index b3eec84673..24ebe383d7 100644 --- a/read-cache.c +++ b/read-cache.c @@ -3,7 +3,6 @@ * * Copyright (C) Linus Torvalds, 2005 */ -#include #include "cache.h" struct cache_entry **active_cache = NULL; diff --git a/rpull.c b/rpull.c index b48e63157c..36e49f799a 100644 --- a/rpull.c +++ b/rpull.c @@ -1,11 +1,5 @@ -#include -#include -#include -#include #include "cache.h" #include "commit.h" -#include -#include #include "rsh.h" #include "pull.h" diff --git a/sha1_file.c b/sha1_file.c index edbf9f9a84..e6fdaa217a 100644 --- a/sha1_file.c +++ b/sha1_file.c @@ -6,8 +6,6 @@ * This handles basic git sha1 object files - packing, unpacking, * creation etc. */ -#include -#include #include "cache.h" #include "delta.h" diff --git a/usage.c b/usage.c index e774d2ef32..86211c9141 100644 --- a/usage.c +++ b/usage.c @@ -3,7 +3,6 @@ * * Copyright (C) Linus Torvalds, 2005 */ -#include #include "cache.h" static void report(const char *prefix, const char *err, va_list params) -- 2.11.4.GIT