Code

builtin: use builtin.h for all builtin commands
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Wed, 1 Sep 2010 15:45:00 +0000 (15:45 +0000)
committerÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Sat, 30 Oct 2010 07:09:14 +0000 (07:09 +0000)
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 <avarab@gmail.com>
18 files changed:
builtin/clone.c
builtin/fetch-pack.c
builtin/hash-object.c
builtin/index-pack.c
builtin/merge-index.c
builtin/merge-recursive.c
builtin/merge-tree.c
builtin/mktag.c
builtin/pack-redundant.c
builtin/pack-refs.c
builtin/patch-id.c
builtin/receive-pack.c
builtin/remote.c
builtin/reset.c
builtin/send-pack.c
builtin/unpack-file.c
builtin/var.c
wt-status.c

index 19ed64041d0575ee1ad49071dfe1e671114b8ae3..994d527dcf0830ce10a3b496e08d71cc3530c007 100644 (file)
@@ -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"
index dbd8b7bcc8b5ddea9bec3a0c774346007cb0d31c..fd70b4c37ddd0a3f13c983314de2051df93977ea 100644 (file)
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "builtin.h"
 #include "refs.h"
 #include "pkt-line.h"
 #include "commit.h"
index 080af1a01b8155680faf6c04101217b60ae7b919..8a5670f8f9fac8b0a0162f24b77ee3dc2b842fec 100644 (file)
@@ -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"
index 8dc5c0b5410d4bb57607bab690126f22d954dd7a..8d1af0630938320ffbf6b0331d46b561c3379e64 100644 (file)
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "builtin.h"
 #include "delta.h"
 #include "pack.h"
 #include "csum-file.h"
index 2c4cf5e559b4166973f12bda567e1a6c5657a7e7..adc2a6dfb3290b2126a1ac68df31eb921c4b1196 100644 (file)
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "builtin.h"
 #include "run-command.h"
 #include "exec_cmd.h"
 
index c33091b3ed52bc8539ff82f039ec8c7718f3dcc2..3a64f5d0bdbcc8d7d21edb01f285cc8b41755228 100644 (file)
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "builtin.h"
 #include "commit.h"
 #include "tag.h"
 #include "merge-recursive.h"
index 9b25ddc9794efe489ee9ec9fd3203ffa997f03f7..19917426fba19cf60b838ff9b07d20b5e44259a5 100644 (file)
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "builtin.h"
 #include "tree-walk.h"
 #include "xdiff-interface.h"
 #include "blob.h"
index 1cb0f3f2a7cf580efc76957de24684630d596af9..9148cc0609a8dab6b6dc1d7d96e5c42705fc7ca1 100644 (file)
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "builtin.h"
 #include "tag.h"
 #include "exec_cmd.h"
 
index 41e1615a28d772d1677c172ff2f570f31de4026f..a15e3661f4f4b9d113f478ee5fbcc2ad1b5c1555 100644 (file)
@@ -6,7 +6,7 @@
 *
 */
 
-#include "cache.h"
+#include "builtin.h"
 #include "exec_cmd.h"
 
 #define BLKSIZE 512
index 091860b2e370561f0811399b0d307e732e9eaac3..39a9d89fbdf322a8ef42a62e41ac36af934ff638 100644 (file)
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "builtin.h"
 #include "parse-options.h"
 #include "pack-refs.h"
 
index 512530022edac398f8541ee6c400c7312659e730..33e9725a4a6aa641f4c1fefd3a541c35f2fd54f7 100644 (file)
@@ -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)
index 760817dbd7fec0086a0a1b62e58ab4438f227b7b..f64b79c95d5c6d2a0c459ac58c6fd36d0f898486 100644 (file)
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "builtin.h"
 #include "pack.h"
 #include "refs.h"
 #include "pkt-line.h"
index e9a6e09257f445b1c26833dd9fae89518369daa7..37c3595b399cb4c8153d389d1b49853c72842937 100644 (file)
@@ -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"
 
index 0037be4693bbd875e644df13ce4a9fae31e7378c..c198b8ef5be8b230dbc52edd8d8c0909ec1930b0 100644 (file)
@@ -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"
index 481602d8ae73612226bcc758f2aedea7f964779c..a55a51758d82c368ee7c75ffd94569f592105e28 100644 (file)
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "builtin.h"
 #include "commit.h"
 #include "refs.h"
 #include "pkt-line.h"
index 608590ada8105a2e6a8cb9d6176696b511b410f6..c905d80e3ce47ec21af6b51338228ab52622cf7c 100644 (file)
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "builtin.h"
 #include "blob.h"
 #include "exec_cmd.h"
 
index 0744bb83185289e26bd32b3b2ecaec717d8c75d7..1787771cdfa7dea5ac0d44db448df2964f7c5f41 100644 (file)
@@ -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 | <variable>)";
index fc2438f60b0e0e87772db2a9f3e407f351bb03d0..bfc97fbe7f86477aee32e95f38201521fe920f96 100644 (file)
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "builtin.h"
 #include "wt-status.h"
 #include "object.h"
 #include "dir.h"