From: Ævar Arnfjörð Bjarmason Date: Wed, 1 Sep 2010 15:45:00 +0000 (+0000) Subject: builtin: use builtin.h for all builtin commands X-Git-Tag: ko-pu~10^2~158 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=b002c656fa5221b999ca7b01c946b738644e9739;p=git.git builtin: use builtin.h for all builtin commands Change the builtin/*.c files and wt-status.c files which weren't using builtin.h to use it, also remove any git-compat-util.h, strbuf.h and cache.h from those files. We can trust on builtin.h including them. builtin.h also includes commit.h and notes.h. But I haven't removed these includes. They're redundant now, but we may want to remove them from builtin.h in the future. This impeded my efforts to gettextize git, since I'd otherwise have to add gettext.h to all of these. Using builtin.h is a good idea in any case, since it's defining the prototypes for the cmd_* functions that these files define. Signed-off-by: Ævar Arnfjörð Bjarmason --- diff --git a/builtin/clone.c b/builtin/clone.c index 19ed64041..994d527dc 100644 --- a/builtin/clone.c +++ b/builtin/clone.c @@ -8,7 +8,7 @@ * Clone a repository into a different directory that does not yet exist. */ -#include "cache.h" +#include "builtin.h" #include "parse-options.h" #include "fetch-pack.h" #include "refs.h" @@ -16,7 +16,6 @@ #include "tree-walk.h" #include "unpack-trees.h" #include "transport.h" -#include "strbuf.h" #include "dir.h" #include "pack-refs.h" #include "sigchain.h" diff --git a/builtin/fetch-pack.c b/builtin/fetch-pack.c index dbd8b7bcc..fd70b4c37 100644 --- a/builtin/fetch-pack.c +++ b/builtin/fetch-pack.c @@ -1,4 +1,4 @@ -#include "cache.h" +#include "builtin.h" #include "refs.h" #include "pkt-line.h" #include "commit.h" diff --git a/builtin/hash-object.c b/builtin/hash-object.c index 080af1a01..8a5670f8f 100644 --- a/builtin/hash-object.c +++ b/builtin/hash-object.c @@ -4,7 +4,7 @@ * Copyright (C) Linus Torvalds, 2005 * Copyright (C) Junio C Hamano, 2005 */ -#include "cache.h" +#include "builtin.h" #include "blob.h" #include "quote.h" #include "parse-options.h" diff --git a/builtin/index-pack.c b/builtin/index-pack.c index 8dc5c0b54..8d1af0630 100644 --- a/builtin/index-pack.c +++ b/builtin/index-pack.c @@ -1,4 +1,4 @@ -#include "cache.h" +#include "builtin.h" #include "delta.h" #include "pack.h" #include "csum-file.h" diff --git a/builtin/merge-index.c b/builtin/merge-index.c index 2c4cf5e55..adc2a6dfb 100644 --- a/builtin/merge-index.c +++ b/builtin/merge-index.c @@ -1,4 +1,4 @@ -#include "cache.h" +#include "builtin.h" #include "run-command.h" #include "exec_cmd.h" diff --git a/builtin/merge-recursive.c b/builtin/merge-recursive.c index c33091b3e..3a64f5d0b 100644 --- a/builtin/merge-recursive.c +++ b/builtin/merge-recursive.c @@ -1,4 +1,4 @@ -#include "cache.h" +#include "builtin.h" #include "commit.h" #include "tag.h" #include "merge-recursive.h" diff --git a/builtin/merge-tree.c b/builtin/merge-tree.c index 9b25ddc97..19917426f 100644 --- a/builtin/merge-tree.c +++ b/builtin/merge-tree.c @@ -1,4 +1,4 @@ -#include "cache.h" +#include "builtin.h" #include "tree-walk.h" #include "xdiff-interface.h" #include "blob.h" diff --git a/builtin/mktag.c b/builtin/mktag.c index 1cb0f3f2a..9148cc060 100644 --- a/builtin/mktag.c +++ b/builtin/mktag.c @@ -1,4 +1,4 @@ -#include "cache.h" +#include "builtin.h" #include "tag.h" #include "exec_cmd.h" diff --git a/builtin/pack-redundant.c b/builtin/pack-redundant.c index 41e1615a2..a15e3661f 100644 --- a/builtin/pack-redundant.c +++ b/builtin/pack-redundant.c @@ -6,7 +6,7 @@ * */ -#include "cache.h" +#include "builtin.h" #include "exec_cmd.h" #define BLKSIZE 512 diff --git a/builtin/pack-refs.c b/builtin/pack-refs.c index 091860b2e..39a9d89fb 100644 --- a/builtin/pack-refs.c +++ b/builtin/pack-refs.c @@ -1,4 +1,4 @@ -#include "cache.h" +#include "builtin.h" #include "parse-options.h" #include "pack-refs.h" diff --git a/builtin/patch-id.c b/builtin/patch-id.c index 512530022..33e9725a4 100644 --- a/builtin/patch-id.c +++ b/builtin/patch-id.c @@ -1,4 +1,4 @@ -#include "cache.h" +#include "builtin.h" #include "exec_cmd.h" static void flush_current_id(int patchlen, unsigned char *id, git_SHA_CTX *c) diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c index 760817dbd..f64b79c95 100644 --- a/builtin/receive-pack.c +++ b/builtin/receive-pack.c @@ -1,4 +1,4 @@ -#include "cache.h" +#include "builtin.h" #include "pack.h" #include "refs.h" #include "pkt-line.h" diff --git a/builtin/remote.c b/builtin/remote.c index e9a6e0925..37c3595b3 100644 --- a/builtin/remote.c +++ b/builtin/remote.c @@ -1,9 +1,8 @@ -#include "cache.h" +#include "builtin.h" #include "parse-options.h" #include "transport.h" #include "remote.h" #include "string-list.h" -#include "strbuf.h" #include "run-command.h" #include "refs.h" diff --git a/builtin/reset.c b/builtin/reset.c index 0037be469..c198b8ef5 100644 --- a/builtin/reset.c +++ b/builtin/reset.c @@ -7,7 +7,7 @@ * * Copyright (c) 2005, 2006 Linus Torvalds and Junio C Hamano */ -#include "cache.h" +#include "builtin.h" #include "tag.h" #include "object.h" #include "commit.h" diff --git a/builtin/send-pack.c b/builtin/send-pack.c index 481602d8a..a55a51758 100644 --- a/builtin/send-pack.c +++ b/builtin/send-pack.c @@ -1,4 +1,4 @@ -#include "cache.h" +#include "builtin.h" #include "commit.h" #include "refs.h" #include "pkt-line.h" diff --git a/builtin/unpack-file.c b/builtin/unpack-file.c index 608590ada..c905d80e3 100644 --- a/builtin/unpack-file.c +++ b/builtin/unpack-file.c @@ -1,4 +1,4 @@ -#include "cache.h" +#include "builtin.h" #include "blob.h" #include "exec_cmd.h" diff --git a/builtin/var.c b/builtin/var.c index 0744bb831..1787771cd 100644 --- a/builtin/var.c +++ b/builtin/var.c @@ -3,7 +3,7 @@ * * Copyright (C) Eric Biederman, 2005 */ -#include "cache.h" +#include "builtin.h" #include "exec_cmd.h" static const char var_usage[] = "git var (-l | )"; diff --git a/wt-status.c b/wt-status.c index fc2438f60..bfc97fbe7 100644 --- a/wt-status.c +++ b/wt-status.c @@ -1,4 +1,4 @@ -#include "cache.h" +#include "builtin.h" #include "wt-status.h" #include "object.h" #include "dir.h"