@matheusbsbs / matheus-bagliano / commits / baffc0e770
Fork 0

Make every builtin-*.c file #include "builtin.h"

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>

Peter Hagervall committed Jul 15, 2007 at 01:14 UTC baffc0e7708de1655665d150081e8880501736fe
12 files changed +17 -5
builtin-bundle.c
+1
@@ -1,3 +1,4 @@
1 +#include "builtin.h"
2 #include "cache.h"
3 #include "object.h"
4 #include "commit.h"
builtin-checkout-index.c
+1
@@ -36,6 +36,7 @@
36 * of "-a" causing problems (not possible in the above example,
37 * but get used to it in scripting!).
38 */
39 +#include "builtin.h"
40 #include "cache.h"
41 #include "strbuf.h"
42 #include "quote.h"
builtin-fetch--tool.c
+1
@@ -1,3 +1,4 @@
1 +#include "builtin.h"
2 #include "cache.h"
3 #include "refs.h"
4 #include "commit.h"
builtin-for-each-ref.c
+2 -1
@@ -1,3 +1,4 @@
1 +#include "builtin.h"
2 #include "cache.h"
3 #include "refs.h"
4 #include "object.h"
@@ -796,7 +797,7 @@ static struct ref_sort *default_sort(void)
797 return sort;
798 }
799
799 -int cmd_for_each_ref(int ac, const char **av, char *prefix)
800 +int cmd_for_each_ref(int ac, const char **av, const char *prefix)
801 {
802 int i, num_refs;
803 const char *format = NULL;
builtin-fsck.c
+2 -1
@@ -1,3 +1,4 @@
1 +#include "builtin.h"
2 #include "cache.h"
3 #include "commit.h"
4 #include "tree.h"
@@ -659,7 +660,7 @@ static const char fsck_usage[] =
660 "git-fsck [--tags] [--root] [[--unreachable] [--cache] [--full] "
661 "[--strict] [--verbose] <head-sha1>*]";
662
662 -int cmd_fsck(int argc, char **argv, const char *prefix)
663 +int cmd_fsck(int argc, const char **argv, const char *prefix)
664 {
665 int i, heads;
666
builtin-gc.c
+1
@@ -10,6 +10,7 @@
10 * Copyright (c) 2006 Shawn O. Pearce
11 */
12
13 +#include "builtin.h"
14 #include "cache.h"
15 #include "run-command.h"
16
builtin-merge-base.c
+1
@@ -1,3 +1,4 @@
1 +#include "builtin.h"
2 #include "cache.h"
3 #include "commit.h"
4
builtin-merge-file.c
+4 -3
@@ -1,3 +1,4 @@
1 +#include "builtin.h"
2 #include "cache.h"
3 #include "xdiff/xdiff.h"
4 #include "xdiff-interface.h"
@@ -5,9 +6,9 @@
6 static const char merge_file_usage[] =
7 "git merge-file [-p | --stdout] [-q | --quiet] [-L name1 [-L orig [-L name2]]] file1 orig_file file2";
8
8 -int cmd_merge_file(int argc, char **argv, char **envp)
9 +int cmd_merge_file(int argc, const char **argv, const char *prefix)
10 {
10 - char *names[3];
11 + const char *names[3];
12 mmfile_t mmfs[3];
13 mmbuffer_t result = {NULL, 0};
14 xpparam_t xpp = {XDF_NEED_MINIMAL};
@@ -51,7 +52,7 @@ int cmd_merge_file(int argc, char **argv, char **envp)
52 free(mmfs[i].ptr);
53
54 if (ret >= 0) {
54 - char *filename = argv[1];
55 + const char *filename = argv[1];
56 FILE *f = to_stdout ? stdout : fopen(filename, "wb");
57
58 if (!f)
builtin-pack-refs.c
+1
@@ -1,3 +1,4 @@
1 +#include "builtin.h"
2 #include "cache.h"
3 #include "refs.h"
4 #include "object.h"
builtin-rerere.c
+1
@@ -1,3 +1,4 @@
1 +#include "builtin.h"
2 #include "cache.h"
3 #include "path-list.h"
4 #include "xdiff/xdiff.h"
builtin-runstatus.c
+1
@@ -1,3 +1,4 @@
1 +#include "builtin.h"
2 #include "cache.h"
3 #include "wt-status.h"
4
builtin-show-ref.c
+1
@@ -1,3 +1,4 @@
1 +#include "builtin.h"
2 #include "cache.h"
3 #include "refs.h"
4 #include "object.h"