summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: fcd056a)
raw | patch | inline | side by side (parent: fcd056a)
author | Junio C Hamano <gitster@pobox.com> | |
Fri, 8 Jun 2007 09:54:57 +0000 (02:54 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Fri, 8 Jun 2007 09:54:57 +0000 (02:54 -0700) |
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-stripspace.c | patch | blob | history | |
builtin.h | patch | blob | history | |
commit.c | patch | blob | history | |
commit.h | patch | blob | history | |
diff.c | patch | blob | history | |
diff.h | patch | blob | history | |
quote.c | patch | blob | history | |
quote.h | patch | blob | history | |
upload-pack.c | patch | blob | history |
diff --git a/builtin-stripspace.c b/builtin-stripspace.c
index f0d4d9e2d10446a229094c991363f5a17ce4c666..62bd4b547b8c7efaa982cef61edf365466089eb6 100644 (file)
--- a/builtin-stripspace.c
+++ b/builtin-stripspace.c
return 1;
}
-void stripspace(FILE *in, FILE *out)
+static void stripspace(FILE *in, FILE *out)
{
int empties = -1;
int incomplete = 0;
diff --git a/builtin.h b/builtin.h
index fe8ba9e65f2158341ba72c60915c51471700161d..da4834c312445ae2b987000eba9891b7c3b265b5 100644 (file)
--- a/builtin.h
+++ b/builtin.h
extern const char git_usage_string[];
extern void help_unknown_cmd(const char *cmd);
-extern void stripspace(FILE *in, FILE *out);
extern int write_tree(unsigned char *sha1, int missing_ok, const char *prefix);
extern void prune_packed_objects(int);
diff --git a/commit.c b/commit.c
index 57b69ca7fa65ccec4502a53fd48d1684cfd09685..4ca4d44ba0d648c6c102ac17160b69f6f0f02836 100644 (file)
--- a/commit.c
+++ b/commit.c
return item;
}
-int count_parents(struct commit * commit)
-{
- int count;
- struct commit_list * parents = commit->parents;
- for (count = 0; parents; parents = parents->next,count++)
- ;
- return count;
-}
-
void topo_sort_default_setter(struct commit *c, void *data)
{
c->util = data;
diff --git a/commit.h b/commit.h
index 75b43a53edcd082fbe148dad3ddc66e85471f0b4..a313b53c3106c6f2502bf02c86db47a0df5b0f6c 100644 (file)
--- a/commit.h
+++ b/commit.h
void clear_commit_marks(struct commit *commit, unsigned int mark);
-int count_parents(struct commit * commit);
-
/*
* Performs an in-place topological sort of list supplied.
*
index cafa7debeb7dd1f3ecc15f24bd41959fb12448d5..1d234d361d29605c49da8fa177ebb563cf3066c1 100644 (file)
--- a/diff.c
+++ b/diff.c
@@ -2103,6 +2103,8 @@ static int opt_arg(const char *arg, int arg_short, const char *arg_long, int *va
return 1;
}
+static int diff_scoreopt_parse(const char *opt);
+
int diff_opt_parse(struct diff_options *options, const char **av, int ac)
{
const char *arg = av[0];
return (int)((num >= scale) ? MAX_SCORE : (MAX_SCORE * num / scale));
}
-int diff_scoreopt_parse(const char *opt)
+static int diff_scoreopt_parse(const char *opt)
{
int opt1, opt2, cmd;
index 63738c1dd4c71cb1beacaffea40bf51377a137ea..a7ee6d8c87887b111ef84b95266e1ff43496e7c3 100644 (file)
--- a/diff.h
+++ b/diff.h
unsigned mode,
const unsigned char *sha1);
-extern int diff_scoreopt_parse(const char *opt);
-
#define DIFF_SETUP_REVERSE 1
#define DIFF_SETUP_USE_CACHE 2
#define DIFF_SETUP_USE_SIZE_CACHE 4
index fb9e4ca253ea9bcadbcb55dcdd62be614c66758f..aa440098e1d8a771aa2d9d2e17355fd560f3c253 100644 (file)
--- a/quote.c
+++ b/quote.c
return (c == '\'' || c == '!');
}
-size_t sq_quote_buf(char *dst, size_t n, const char *src)
+static size_t sq_quote_buf(char *dst, size_t n, const char *src)
{
char c;
char *bp = dst;
fputc('\'', stream);
}
-char *sq_quote(const char *src)
-{
- char *buf;
- size_t cnt;
-
- cnt = sq_quote_buf(NULL, 0, src) + 1;
- buf = xmalloc(cnt);
- sq_quote_buf(buf, cnt, src);
-
- return buf;
-}
-
char *sq_quote_argv(const char** argv, int count)
{
char *buf, *to;
index bdc3610df51000baeda49da1eeaec20ccb2682fb..8a59cc55d1dcfba728614b2d6494272ceafbf3a1 100644 (file)
--- a/quote.h
+++ b/quote.h
* excluding the final null regardless of the buffer size.
*/
-extern char *sq_quote(const char *src);
extern void sq_quote_print(FILE *stream, const char *src);
-extern size_t sq_quote_buf(char *dst, size_t n, const char *src);
extern char *sq_quote_argv(const char** argv, int count);
/*
diff --git a/upload-pack.c b/upload-pack.c
index 0e881c85b5cc5e128904d5a149634c077b62644d..fe96ef15c43fa6e3f8f947f84ddce3c498e82859 100644 (file)
--- a/upload-pack.c
+++ b/upload-pack.c
return safe_write(fd, data, sz);
}
-FILE *pack_pipe = NULL;
+static FILE *pack_pipe = NULL;
static void show_commit(struct commit *commit)
{
if (commit->object.flags & BOUNDARY)