summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 46cf98b)
raw | patch | inline | side by side (parent: 46cf98b)
author | Peter Hagervall <hager@cs.umu.se> | |
Sat, 14 Jul 2007 23:14:45 +0000 (01:14 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 15 Jul 2007 05:44:09 +0000 (22:44 -0700) |
Make every builtin-*.c file #include "builtin.h".
Also takes care of some declaration/definition mismatches.
Signed-off-by: Peter Hagervall <hager@cs.umu.se>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Also takes care of some declaration/definition mismatches.
Signed-off-by: Peter Hagervall <hager@cs.umu.se>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 files changed:
diff --git a/builtin-bundle.c b/builtin-bundle.c
index 306ad29597dbf9002a44ba509c2e9d7a737b159d..6ae5ab04c95ab99538bbcf9ef2f5031e7237df3a 100644 (file)
--- a/builtin-bundle.c
+++ b/builtin-bundle.c
+#include "builtin.h"
#include "cache.h"
#include "object.h"
#include "commit.h"
index 8460f97b6637127d78b58caf2e29d25f3ad0b5a0..75377b9cab75ac75c6d5d7f79fdcf64bdb27cff2 100644 (file)
--- a/builtin-checkout-index.c
+++ b/builtin-checkout-index.c
* of "-a" causing problems (not possible in the above example,
* but get used to it in scripting!).
*/
+#include "builtin.h"
#include "cache.h"
#include "strbuf.h"
#include "quote.h"
diff --git a/builtin-fetch--tool.c b/builtin-fetch--tool.c
index ed4d5de5d5e6d0bef5b29f3d21a3e58ff7778c8b..e2f8ede9ae4507ed1e431f9d14fc649f6475627d 100644 (file)
--- a/builtin-fetch--tool.c
+++ b/builtin-fetch--tool.c
+#include "builtin.h"
#include "cache.h"
#include "refs.h"
#include "commit.h"
diff --git a/builtin-for-each-ref.c b/builtin-for-each-ref.c
index 2b218425aab2c37a826bfbe22535f2e5b7002a26..0afa1c5c41e79a05ddebb7d874956163510daf0b 100644 (file)
--- a/builtin-for-each-ref.c
+++ b/builtin-for-each-ref.c
+#include "builtin.h"
#include "cache.h"
#include "refs.h"
#include "object.h"
return sort;
}
-int cmd_for_each_ref(int ac, const char **av, char *prefix)
+int cmd_for_each_ref(int ac, const char **av, const char *prefix)
{
int i, num_refs;
const char *format = NULL;
diff --git a/builtin-fsck.c b/builtin-fsck.c
index a6ef65ea321c614c7616862a44ce0af7998e5749..350ec5e1445a3743a4b9a5039d16d9dba505cf4e 100644 (file)
--- a/builtin-fsck.c
+++ b/builtin-fsck.c
+#include "builtin.h"
#include "cache.h"
#include "commit.h"
#include "tree.h"
"git-fsck [--tags] [--root] [[--unreachable] [--cache] [--full] "
"[--strict] [--verbose] <head-sha1>*]";
-int cmd_fsck(int argc, char **argv, const char *prefix)
+int cmd_fsck(int argc, const char **argv, const char *prefix)
{
int i, heads;
diff --git a/builtin-gc.c b/builtin-gc.c
index 45025fba30c1fb594a696c26a7eac11862cfd8f9..939748261041049f31d62935ec08f062bdfa6e79 100644 (file)
--- a/builtin-gc.c
+++ b/builtin-gc.c
* Copyright (c) 2006 Shawn O. Pearce
*/
+#include "builtin.h"
#include "cache.h"
#include "run-command.h"
diff --git a/builtin-merge-base.c b/builtin-merge-base.c
index e35d362f2697ebc7e627f230283aedb8ed92857f..0108e22adee8b4de922a2b00b514dd4d4cf23c55 100644 (file)
--- a/builtin-merge-base.c
+++ b/builtin-merge-base.c
+#include "builtin.h"
#include "cache.h"
#include "commit.h"
diff --git a/builtin-merge-file.c b/builtin-merge-file.c
index 10ec63b17e6b16382f2b39e5c01cc6cf1dce448e..58deb62ac08507901c40e89aec0cea7fcdc78f1e 100644 (file)
--- a/builtin-merge-file.c
+++ b/builtin-merge-file.c
+#include "builtin.h"
#include "cache.h"
#include "xdiff/xdiff.h"
#include "xdiff-interface.h"
static const char merge_file_usage[] =
"git merge-file [-p | --stdout] [-q | --quiet] [-L name1 [-L orig [-L name2]]] file1 orig_file file2";
-int cmd_merge_file(int argc, char **argv, char **envp)
+int cmd_merge_file(int argc, const char **argv, const char *prefix)
{
- char *names[3];
+ const char *names[3];
mmfile_t mmfs[3];
mmbuffer_t result = {NULL, 0};
xpparam_t xpp = {XDF_NEED_MINIMAL};
free(mmfs[i].ptr);
if (ret >= 0) {
- char *filename = argv[1];
+ const char *filename = argv[1];
FILE *f = to_stdout ? stdout : fopen(filename, "wb");
if (!f)
diff --git a/builtin-pack-refs.c b/builtin-pack-refs.c
index 758499238f6d4110eb3740b77c92753edc8e5760..09df4e11a8bb89cded9be4af06bb162b7a92bd4c 100644 (file)
--- a/builtin-pack-refs.c
+++ b/builtin-pack-refs.c
+#include "builtin.h"
#include "cache.h"
#include "refs.h"
#include "object.h"
diff --git a/builtin-rerere.c b/builtin-rerere.c
index 6ffc43d86440727cf9a782ed8fc0f68755551796..29d057c98cc255e718df540a62177101d9789abe 100644 (file)
--- a/builtin-rerere.c
+++ b/builtin-rerere.c
+#include "builtin.h"
#include "cache.h"
#include "path-list.h"
#include "xdiff/xdiff.h"
diff --git a/builtin-runstatus.c b/builtin-runstatus.c
index 4b489b1214e1ae693a9b0b5166909800f5ca94ac..2db25c88bf648e4d5f2f41502fd29c5f7324e56b 100644 (file)
--- a/builtin-runstatus.c
+++ b/builtin-runstatus.c
+#include "builtin.h"
#include "cache.h"
#include "wt-status.h"
diff --git a/builtin-show-ref.c b/builtin-show-ref.c
index 9463ff0e69b15fc0e544259e64960bc942a98368..65051d14fde44c14d12099df656ac423bc1c347e 100644 (file)
--- a/builtin-show-ref.c
+++ b/builtin-show-ref.c
+#include "builtin.h"
#include "cache.h"
#include "refs.h"
#include "object.h"