summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
Diffstat (limited to 'builtin')
-rw-r--r--builtin/clone.c2
-rw-r--r--builtin/fetch-pack.c2
-rw-r--r--builtin/fmt-merge-msg.c2
-rw-r--r--builtin/hash-object.c2
-rw-r--r--builtin/index-pack.c2
-rw-r--r--builtin/merge-index.c3
-rw-r--r--builtin/merge-recursive.c2
-rw-r--r--builtin/merge-tree.c2
-rw-r--r--builtin/mktag.c3
-rw-r--r--builtin/notes.c4
-rw-r--r--builtin/pack-redundant.c3
-rw-r--r--builtin/pack-refs.c2
-rw-r--r--builtin/patch-id.c5
-rw-r--r--builtin/remote-ext.c2
-rw-r--r--builtin/remote-fd.c2
-rw-r--r--builtin/remote.c2
-rw-r--r--builtin/reset.c2
-rw-r--r--builtin/send-pack.c2
-rw-r--r--builtin/unpack-file.c4
-rw-r--r--builtin/var.c3
20 files changed, 22 insertions, 29 deletions
diff --git a/builtin/clone.c b/builtin/clone.c
index 02547ad..c6e10bb 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"
diff --git a/builtin/fetch-pack.c b/builtin/fetch-pack.c
index 272bc38..ef39862 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/fmt-merge-msg.c b/builtin/fmt-merge-msg.c
index 5189b16..7581632 100644
--- a/builtin/fmt-merge-msg.c
+++ b/builtin/fmt-merge-msg.c
@@ -31,7 +31,7 @@ struct src_data {
int head_status;
};
-void init_src_data(struct src_data *data)
+static void init_src_data(struct src_data *data)
{
data->branch.strdup_strings = 1;
data->tag.strdup_strings = 1;
diff --git a/builtin/hash-object.c b/builtin/hash-object.c
index c90acdd..b96f46a 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 c7e600d..5a67c81 100644
--- a/builtin/index-pack.c
+++ b/builtin/index-pack.c
@@ -207,7 +207,7 @@ static void parse_pack_header(void)
static NORETURN void bad_object(unsigned long offset, const char *format,
...) __attribute__((format (printf, 2, 3)));
-static void bad_object(unsigned long offset, const char *format, ...)
+static NORETURN void bad_object(unsigned long offset, const char *format, ...)
{
va_list params;
char buf[1024];
diff --git a/builtin/merge-index.c b/builtin/merge-index.c
index 2c4cf5e..2338832 100644
--- a/builtin/merge-index.c
+++ b/builtin/merge-index.c
@@ -1,6 +1,5 @@
-#include "cache.h"
+#include "builtin.h"
#include "run-command.h"
-#include "exec_cmd.h"
static const char *pgm;
static int one_shot, quiet;
diff --git a/builtin/merge-recursive.c b/builtin/merge-recursive.c
index c33091b..3a64f5d 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..d0ccbb2 100644
--- a/builtin/mktag.c
+++ b/builtin/mktag.c
@@ -1,6 +1,5 @@
-#include "cache.h"
+#include "builtin.h"
#include "tag.h"
-#include "exec_cmd.h"
/*
* A signature file has a very simple fixed format: four lines
diff --git a/builtin/notes.c b/builtin/notes.c
index 0aab150..a0f310b 100644
--- a/builtin/notes.c
+++ b/builtin/notes.c
@@ -423,7 +423,7 @@ void finish_copy_notes_for_rewrite(struct notes_rewrite_cfg *c)
free(c);
}
-int notes_copy_from_stdin(int force, const char *rewrite_cmd)
+static int notes_copy_from_stdin(int force, const char *rewrite_cmd)
{
struct strbuf buf = STRBUF_INIT;
struct notes_rewrite_cfg *c = NULL;
@@ -819,7 +819,7 @@ static int merge_commit(struct notes_merge_options *o)
t = xcalloc(1, sizeof(struct notes_tree));
init_notes(t, "NOTES_MERGE_PARTIAL", combine_notes_overwrite, 0);
- o->local_ref = resolve_ref("NOTES_MERGE_REF", sha1, 0, 0);
+ o->local_ref = resolve_ref("NOTES_MERGE_REF", sha1, 0, NULL);
if (!o->local_ref)
die("Failed to resolve NOTES_MERGE_REF");
diff --git a/builtin/pack-redundant.c b/builtin/pack-redundant.c
index 41e1615..f5c6afc 100644
--- a/builtin/pack-redundant.c
+++ b/builtin/pack-redundant.c
@@ -6,8 +6,7 @@
*
*/
-#include "cache.h"
-#include "exec_cmd.h"
+#include "builtin.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 49a0472..f821eb3 100644
--- a/builtin/patch-id.c
+++ b/builtin/patch-id.c
@@ -1,5 +1,4 @@
-#include "cache.h"
-#include "exec_cmd.h"
+#include "builtin.h"
static void flush_current_id(int patchlen, unsigned char *id, git_SHA_CTX *c)
{
@@ -57,7 +56,7 @@ static int scan_hunk_header(const char *p, int *p_before, int *p_after)
return 1;
}
-int get_one_patchid(unsigned char *next_sha1, git_SHA_CTX *ctx)
+static int get_one_patchid(unsigned char *next_sha1, git_SHA_CTX *ctx)
{
static char line[1000];
int patchlen = 0, found_next = 0;
diff --git a/builtin/remote-ext.c b/builtin/remote-ext.c
index ea71977..155e609 100644
--- a/builtin/remote-ext.c
+++ b/builtin/remote-ext.c
@@ -1,4 +1,4 @@
-#include "git-compat-util.h"
+#include "builtin.h"
#include "transport.h"
#include "run-command.h"
diff --git a/builtin/remote-fd.c b/builtin/remote-fd.c
index 1f2467b..08d7121 100644
--- a/builtin/remote-fd.c
+++ b/builtin/remote-fd.c
@@ -1,4 +1,4 @@
-#include "git-compat-util.h"
+#include "builtin.h"
#include "transport.h"
/*
diff --git a/builtin/remote.c b/builtin/remote.c
index cb26080..b71ecd2 100644
--- a/builtin/remote.c
+++ b/builtin/remote.c
@@ -1,4 +1,4 @@
-#include "cache.h"
+#include "builtin.h"
#include "parse-options.h"
#include "transport.h"
#include "remote.h"
diff --git a/builtin/reset.c b/builtin/reset.c
index 5de2bce..eb5f98c 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 2cd1c40..8b0911c 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..1920029 100644
--- a/builtin/unpack-file.c
+++ b/builtin/unpack-file.c
@@ -1,6 +1,4 @@
-#include "cache.h"
-#include "blob.h"
-#include "exec_cmd.h"
+#include "builtin.h"
static char *create_temp_file(unsigned char *sha1)
{
diff --git a/builtin/var.c b/builtin/var.c
index 0744bb8..99d068a 100644
--- a/builtin/var.c
+++ b/builtin/var.c
@@ -3,8 +3,7 @@
*
* Copyright (C) Eric Biederman, 2005
*/
-#include "cache.h"
-#include "exec_cmd.h"
+#include "builtin.h"
static const char var_usage[] = "git var (-l | <variable>)";