git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: git@vger.kernel.org
Cc: "Junio C Hamano" <gitster@pobox.com>,
	"Thomas Rast" <trast@student.ethz.ch>,
	"Sam Reed" <sam@reedyboy.net>, "Jan Krüger" <jk@jk.gs>,
	"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Subject: [PATCH 01/63] builtin: use builtin.h for all builtin commands
Date: Sat,  4 Sep 2010 22:10:21 +0000	[thread overview]
Message-ID: <1283638229-14199-2-git-send-email-avarab@gmail.com> (raw)
In-Reply-To: <1283638229-14199-1-git-send-email-avarab@gmail.com>

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>
---
 builtin/clone.c           |    3 +--
 builtin/fetch-pack.c      |    2 +-
 builtin/hash-object.c     |    2 +-
 builtin/index-pack.c      |    2 +-
 builtin/merge-index.c     |    2 +-
 builtin/merge-recursive.c |    2 +-
 builtin/merge-tree.c      |    2 +-
 builtin/mktag.c           |    2 +-
 builtin/pack-redundant.c  |    2 +-
 builtin/pack-refs.c       |    2 +-
 builtin/patch-id.c        |    2 +-
 builtin/receive-pack.c    |    2 +-
 builtin/remote.c          |    3 +--
 builtin/reset.c           |    2 +-
 builtin/send-pack.c       |    2 +-
 builtin/unpack-file.c     |    2 +-
 builtin/var.c             |    2 +-
 wt-status.c               |    2 +-
 18 files changed, 18 insertions(+), 20 deletions(-)

diff --git a/builtin/clone.c b/builtin/clone.c
index 19ed640..994d527 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 dbd8b7b..fd70b4c 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 080af1a..8a5670f 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 2e680d7..9c5c9d6 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 2c4cf5e..adc2a6d 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 78b9db7..ad2d77d 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 9b25ddc..1991742 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 1cb0f3f..9148cc0 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 41e1615..a15e366 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 091860b..39a9d89 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 5125300..33e9725 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 760817d..f64b79c 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 48e0a6b..3cf3c6b 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 0037be4..c198b8e 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 481602d..a55a517 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 608590a..c905d80 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 0744bb8..1787771 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 | <variable>)";
diff --git a/wt-status.c b/wt-status.c
index 54b6b03..b05c6db 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"
-- 
1.7.2.3.313.gcd15

  reply	other threads:[~2010-09-04 22:11 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-04 22:10 [PATCH 00/63] [REDO] Add gettext support to Git Ævar Arnfjörð Bjarmason
2010-09-04 22:10 ` Ævar Arnfjörð Bjarmason [this message]
2010-09-04 22:10 ` [PATCH 02/63] Add infrastructure for translating Git with gettext Ævar Arnfjörð Bjarmason
2010-09-04 22:10 ` [PATCH 05/63] tests: locate i18n lib&data correctly under --valgrind Ævar Arnfjörð Bjarmason
2010-09-04 22:10 ` [PATCH 21/63] po/is.po: add Icelandic translation Ævar Arnfjörð Bjarmason
2010-09-04 22:10 ` [PATCH 26/63] gettext tests: add GETTEXT_POISON=YesPlease Makefile parameter Ævar Arnfjörð Bjarmason
2010-09-04 22:10 ` [PATCH 27/63] gettext tests: skip lib-gettext.sh tests under GETTEXT_POISON Ævar Arnfjörð Bjarmason
2010-09-04 22:10 ` [PATCH 28/63] gettext tests: skip breaking " Ævar Arnfjörð Bjarmason
2010-09-04 22:10 ` [PATCH 51/63] gettextize: git-merge basic messages Ævar Arnfjörð Bjarmason
2010-09-04 22:10 ` [PATCH 63/63] po/en_GB.po: add British English Translation Ævar Arnfjörð Bjarmason
2010-09-06 12:21 ` [PATCH 00/15] [REDO CONTINUE] Add gettext support to Git Ævar Arnfjörð Bjarmason
2010-09-06 12:21 ` [PATCH 01/15] gettextize: git-archive basic messages Ævar Arnfjörð Bjarmason
2010-09-06 12:21 ` [PATCH 02/15] gettextize: git-bundle " Ævar Arnfjörð Bjarmason
2010-09-06 12:21 ` [PATCH 03/15] gettextize: git-clean " Ævar Arnfjörð Bjarmason
2010-09-06 12:21 ` [PATCH 04/15] gettextize: git-clean clean.requireForce messages Ævar Arnfjörð Bjarmason
2010-09-06 12:21 ` [PATCH 05/15] gettextize: git-describe basic messages Ævar Arnfjörð Bjarmason
2010-09-06 12:21 ` [PATCH 06/15] gettextize: git-gc " Ævar Arnfjörð Bjarmason
2010-09-06 12:21 ` [PATCH 07/15] gettextize: git-gc "Auto packing the repository" message Ævar Arnfjörð Bjarmason
2010-09-06 12:21 ` [PATCH 08/15] gettextize: git-notes basic commands Ævar Arnfjörð Bjarmason
2010-09-06 12:21 ` [PATCH 09/15] gettextize: git-notes GIT_NOTES_REWRITE_MODE error message Ævar Arnfjörð Bjarmason
2010-09-06 12:21 ` [PATCH 10/15] gettextize: git-notes "Refusing to %s notes in %s" message Ævar Arnfjörð Bjarmason
2010-09-06 12:21 ` [PATCH 11/15] gettextize: git-revert basic messages Ævar Arnfjörð Bjarmason
2010-09-06 12:21 ` [PATCH 12/15] gettextize: git-revert mark the "me" variable for translation Ævar Arnfjörð Bjarmason
2010-09-06 18:45   ` Jonathan Nieder
2010-09-06 20:06     ` Ævar Arnfjörð Bjarmason
2010-09-06 20:08       ` Jonathan Nieder
2010-09-06 12:21 ` [PATCH 13/15] gettextize: git-revert messages using the "me" variable Ævar Arnfjörð Bjarmason
2010-09-06 18:50   ` Jonathan Nieder
2010-09-06 20:12     ` Ævar Arnfjörð Bjarmason
2010-09-07  5:39       ` Jonathan Nieder
2010-09-07  8:51         ` Ævar Arnfjörð Bjarmason
2010-09-10  0:26           ` Junio C Hamano
2010-09-06 12:21 ` [PATCH 14/15] gettextize: git-revert split up "could not revert/apply" message Ævar Arnfjörð Bjarmason
2010-09-06 18:55   ` Jonathan Nieder
2010-09-06 20:25     ` Ævar Arnfjörð Bjarmason
2010-09-07  5:34       ` Jonathan Nieder
2010-09-07  8:47         ` Ævar Arnfjörð Bjarmason
2010-09-06 12:21 ` [PATCH 15/15] gettextize: git-shortlog basic messages Ævar Arnfjörð Bjarmason
2010-09-06 18:41   ` Jonathan Nieder

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1283638229-14199-2-git-send-email-avarab@gmail.com \
    --to=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jk@jk.gs \
    --cc=sam@reedyboy.net \
    --cc=trast@student.ethz.ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).