From f50fee4a0476dfd1315612f49244e7050280bf68 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sat, 15 Sep 2012 13:56:07 -0700 Subject: builtin/notes.c: mark file-scope private symbols as static Signed-off-by: Junio C Hamano --- builtin.h | 2 -- builtin/notes.c | 7 +++++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/builtin.h b/builtin.h index 8e377522fe..95116b8535 100644 --- a/builtin.h +++ b/builtin.h @@ -21,7 +21,6 @@ struct fmt_merge_msg_opts { extern int fmt_merge_msg(struct strbuf *in, struct strbuf *out, struct fmt_merge_msg_opts *); -extern void commit_notes(struct notes_tree *t, const char *msg); struct notes_rewrite_cfg { struct notes_tree **trees; @@ -33,7 +32,6 @@ struct notes_rewrite_cfg { int mode_from_env; }; -combine_notes_fn parse_combine_notes_fn(const char *v); struct notes_rewrite_cfg *init_copy_notes_for_rewrite(const char *cmd); int copy_note_for_rewrite(struct notes_rewrite_cfg *c, const unsigned char *from_obj, const unsigned char *to_obj); diff --git a/builtin/notes.c b/builtin/notes.c index 554c80167c..453457adb9 100644 --- a/builtin/notes.c +++ b/builtin/notes.c @@ -19,6 +19,9 @@ #include "string-list.h" #include "notes-merge.h" +static void commit_notes(struct notes_tree *t, const char *msg); +static combine_notes_fn parse_combine_notes_fn(const char *v); + static const char * const git_notes_usage[] = { N_("git notes [--ref ] [list []]"), N_("git notes [--ref ] add [-f] [-m | -F | (-c | -C) ] []"), @@ -288,7 +291,7 @@ static int parse_reedit_arg(const struct option *opt, const char *arg, int unset return parse_reuse_arg(opt, arg, unset); } -void commit_notes(struct notes_tree *t, const char *msg) +static void commit_notes(struct notes_tree *t, const char *msg) { struct strbuf buf = STRBUF_INIT; unsigned char commit_sha1[20]; @@ -312,7 +315,7 @@ void commit_notes(struct notes_tree *t, const char *msg) strbuf_release(&buf); } -combine_notes_fn parse_combine_notes_fn(const char *v) +static combine_notes_fn parse_combine_notes_fn(const char *v) { if (!strcasecmp(v, "overwrite")) return combine_notes_overwrite; -- cgit v1.2.3 From 82a75299fa63a388a9a4823bcb687e50964d95fb Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sat, 15 Sep 2012 13:58:15 -0700 Subject: commit.c: mark a file-scope private symbol as static Signed-off-by: Junio C Hamano --- commit.c | 7 +++++-- commit.h | 1 - 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/commit.c b/commit.c index 0ea441d13b..02467676a3 100644 --- a/commit.c +++ b/commit.c @@ -9,6 +9,8 @@ #include "gpg-interface.h" #include "mergesort.h" +static struct commit_extra_header *read_commit_extra_header_lines(const char *buf, size_t len, const char **); + int save_commit_buffer = 1; const char *commit_type = "commit"; @@ -1073,8 +1075,9 @@ static int excluded_header_field(const char *field, size_t len, const char **exc return 0; } -struct commit_extra_header *read_commit_extra_header_lines(const char *buffer, size_t size, - const char **exclude) +static struct commit_extra_header *read_commit_extra_header_lines( + const char *buffer, size_t size, + const char **exclude) { struct commit_extra_header *extra = NULL, **tail = &extra, *it = NULL; const char *line, *next, *eof, *eob; diff --git a/commit.h b/commit.h index 6edce87673..9f2131318d 100644 --- a/commit.h +++ b/commit.h @@ -204,7 +204,6 @@ extern int commit_tree_extended(const struct strbuf *msg, unsigned char *tree, struct commit_extra_header *); extern struct commit_extra_header *read_commit_extra_headers(struct commit *, const char **); -extern struct commit_extra_header *read_commit_extra_header_lines(const char *buf, size_t len, const char **); extern void free_commit_extra_headers(struct commit_extra_header *extra); -- cgit v1.2.3 From d2aea1371bc240a55f0b3c2265171a16ee023f2e Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sat, 15 Sep 2012 13:59:59 -0700 Subject: diff.c: mark a private file-scope symbol as static Signed-off-by: Junio C Hamano --- diff.c | 2 +- diff.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/diff.c b/diff.c index e6846ca750..ddcdfed787 100644 --- a/diff.c +++ b/diff.c @@ -25,7 +25,7 @@ static int diff_detect_rename_default; static int diff_rename_limit_default = 400; static int diff_suppress_blank_empty; -int diff_use_color_default = -1; +static int diff_use_color_default = -1; static const char *diff_word_regex_cfg; static const char *external_diff_cmd_cfg; int diff_auto_refresh_index = 1; diff --git a/diff.h b/diff.h index e25addb806..a658f85f2b 100644 --- a/diff.h +++ b/diff.h @@ -243,7 +243,6 @@ extern int parse_long_opt(const char *opt, const char **argv, extern int git_diff_basic_config(const char *var, const char *value, void *cb); extern int git_diff_ui_config(const char *var, const char *value, void *cb); -extern int diff_use_color_default; extern void diff_setup(struct diff_options *); extern int diff_opt_parse(struct diff_options *, const char **, int); extern void diff_setup_done(struct diff_options *); -- cgit v1.2.3 From ba35480439d05b8f6cca50527072194fe3278bbb Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sat, 15 Sep 2012 14:02:52 -0700 Subject: graph.c: mark private file-scope symbols as static Signed-off-by: Junio C Hamano --- graph.c | 32 ++++++++++++++++++++++++++++++-- graph.h | 27 --------------------------- 2 files changed, 30 insertions(+), 29 deletions(-) diff --git a/graph.c b/graph.c index 7e0a099f83..e864fe2c6a 100644 --- a/graph.c +++ b/graph.c @@ -7,6 +7,34 @@ /* Internal API */ +/* + * Output the next line for a graph. + * This formats the next graph line into the specified strbuf. It is not + * terminated with a newline. + * + * Returns 1 if the line includes the current commit, and 0 otherwise. + * graph_next_line() will return 1 exactly once for each time + * graph_update() is called. + */ +static int graph_next_line(struct git_graph *graph, struct strbuf *sb); + +/* + * Set up a custom scheme for column colors. + * + * The default column color scheme inserts ANSI color escapes to colorize + * the graph. The various color escapes are stored in an array of strings + * where each entry corresponds to a color, except for the last entry, + * which denotes the escape for resetting the color back to the default. + * When generating the graph, strings from this array are inserted before + * and after the various column characters. + * + * This function allows you to enable a custom array of color escapes. + * The 'colors_max' argument is the index of the last "reset" entry. + * + * This functions must be called BEFORE graph_init() is called. + */ +static void graph_set_column_colors(const char **colors, unsigned short colors_max); + /* * Output a padding line in the graph. * This is similar to graph_next_line(). However, it is guaranteed to @@ -62,7 +90,7 @@ enum graph_state { static const char **column_colors; static unsigned short column_colors_max; -void graph_set_column_colors(const char **colors, unsigned short colors_max) +static void graph_set_column_colors(const char **colors, unsigned short colors_max) { column_colors = colors; column_colors_max = colors_max; @@ -1116,7 +1144,7 @@ static void graph_output_collapsing_line(struct git_graph *graph, struct strbuf graph_update_state(graph, GRAPH_PADDING); } -int graph_next_line(struct git_graph *graph, struct strbuf *sb) +static int graph_next_line(struct git_graph *graph, struct strbuf *sb) { switch (graph->state) { case GRAPH_PADDING: diff --git a/graph.h b/graph.h index aff960c7e8..19b0f66316 100644 --- a/graph.h +++ b/graph.h @@ -4,22 +4,6 @@ /* A graph is a pointer to this opaque structure */ struct git_graph; -/* - * Set up a custom scheme for column colors. - * - * The default column color scheme inserts ANSI color escapes to colorize - * the graph. The various color escapes are stored in an array of strings - * where each entry corresponds to a color, except for the last entry, - * which denotes the escape for resetting the color back to the default. - * When generating the graph, strings from this array are inserted before - * and after the various column characters. - * - * This function allows you to enable a custom array of color escapes. - * The 'colors_max' argument is the index of the last "reset" entry. - * - * This functions must be called BEFORE graph_init() is called. - */ -void graph_set_column_colors(const char **colors, unsigned short colors_max); /* * Create a new struct git_graph. @@ -49,17 +33,6 @@ void graph_update(struct git_graph *graph, struct commit *commit); */ int graph_is_commit_finished(struct git_graph const *graph); -/* - * Output the next line for a graph. - * This formats the next graph line into the specified strbuf. It is not - * terminated with a newline. - * - * Returns 1 if the line includes the current commit, and 0 otherwise. - * graph_next_line() will return 1 exactly once for each time - * graph_update() is called. - */ -int graph_next_line(struct git_graph *graph, struct strbuf *sb); - /* * graph_show_*: helper functions for printing to stdout -- cgit v1.2.3 From 7e0d4ab585bb8bd4dba722c96e811a02b6c2fdda Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sat, 15 Sep 2012 14:06:00 -0700 Subject: rerere.c: mark private file-scope symbols as static Signed-off-by: Junio C Hamano --- rerere.c | 2 +- rerere.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/rerere.c b/rerere.c index b57a34daa7..a6a5cd57be 100644 --- a/rerere.c +++ b/rerere.c @@ -25,7 +25,7 @@ const char *rerere_path(const char *hex, const char *file) return git_path("rr-cache/%s/%s", hex, file); } -int has_rerere_resolution(const char *hex) +static int has_rerere_resolution(const char *hex) { struct stat st; return !stat(rerere_path(hex, "postimage"), &st); diff --git a/rerere.h b/rerere.h index fcd8bc10ba..156d2aad80 100644 --- a/rerere.h +++ b/rerere.h @@ -16,7 +16,6 @@ extern void *RERERE_RESOLVED; extern int setup_rerere(struct string_list *, int); extern int rerere(int); extern const char *rerere_path(const char *hex, const char *file); -extern int has_rerere_resolution(const char *hex); extern int rerere_forget(const char **); extern int rerere_remaining(struct string_list *); extern void rerere_clear(struct string_list *); -- cgit v1.2.3 From 96531a5ede7ede4397eb190411bc20256bca3e93 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sat, 15 Sep 2012 14:08:39 -0700 Subject: notes.c: mark a private file-scope symbol as static Signed-off-by: Junio C Hamano --- notes.c | 14 ++++++++++++-- notes.h | 14 -------------- 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/notes.c b/notes.c index 93e9868d5d..bc454e1eab 100644 --- a/notes.c +++ b/notes.c @@ -1196,8 +1196,18 @@ void free_notes(struct notes_tree *t) memset(t, 0, sizeof(struct notes_tree)); } -void format_note(struct notes_tree *t, const unsigned char *object_sha1, - struct strbuf *sb, const char *output_encoding, int flags) +/* + * Fill the given strbuf with the notes associated with the given object. + * + * If the given notes_tree structure is not initialized, it will be auto- + * initialized to the default value (see documentation for init_notes() above). + * If the given notes_tree is NULL, the internal/default notes_tree will be + * used instead. + * + * 'flags' is a bitwise combination of the flags for format_display_notes. + */ +static void format_note(struct notes_tree *t, const unsigned char *object_sha1, + struct strbuf *sb, const char *output_encoding, int flags) { static const char utf8[] = "utf-8"; const unsigned char *sha1; diff --git a/notes.h b/notes.h index c716694b9e..3592b19d2d 100644 --- a/notes.h +++ b/notes.h @@ -241,20 +241,6 @@ void free_notes(struct notes_tree *t); #define NOTES_SHOW_HEADER 1 #define NOTES_INDENT 2 -/* - * Fill the given strbuf with the notes associated with the given object. - * - * If the given notes_tree structure is not initialized, it will be auto- - * initialized to the default value (see documentation for init_notes() above). - * If the given notes_tree is NULL, the internal/default notes_tree will be - * used instead. - * - * 'flags' is a bitwise combination of the above formatting flags. - */ -void format_note(struct notes_tree *t, const unsigned char *object_sha1, - struct strbuf *sb, const char *output_encoding, int flags); - - struct string_list; struct display_notes_opt { -- cgit v1.2.3 From 72f3196a2db0f58b24acd2f9369c7f97d0d770d5 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sat, 15 Sep 2012 22:38:28 -0700 Subject: symlinks.c: mark private file-scope symbols as static Signed-off-by: Junio C Hamano --- cache.h | 2 -- symlinks.c | 7 +++++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/cache.h b/cache.h index eb4a0316d2..c9739d4d45 100644 --- a/cache.h +++ b/cache.h @@ -947,9 +947,7 @@ struct cache_def { extern int has_symlink_leading_path(const char *name, int len); extern int threaded_has_symlink_leading_path(struct cache_def *, const char *, int); extern int check_leading_path(const char *name, int len); -extern int threaded_check_leading_path(struct cache_def *cache, const char *name, int len); extern int has_dirs_only_path(const char *name, int len, int prefix_len); -extern int threaded_has_dirs_only_path(struct cache_def *cache, const char *name, int len, int prefix_len); extern void schedule_dir_for_removal(const char *name, int len); extern void remove_scheduled_dirs(void); diff --git a/symlinks.c b/symlinks.c index 290036744b..c2b41a8501 100644 --- a/symlinks.c +++ b/symlinks.c @@ -1,5 +1,8 @@ #include "cache.h" +static int threaded_check_leading_path(struct cache_def *cache, const char *name, int len); +static int threaded_has_dirs_only_path(struct cache_def *cache, const char *name, int len, int prefix_len); + /* * Returns the length (on a path component basis) of the longest * common prefix match of 'name_a' and 'name_b'. @@ -231,7 +234,7 @@ int check_leading_path(const char *name, int len) * Return path length if leading path exists and is neither a * directory nor a symlink. */ -int threaded_check_leading_path(struct cache_def *cache, const char *name, int len) +static int threaded_check_leading_path(struct cache_def *cache, const char *name, int len) { int flags; int match_len = lstat_cache_matchlen(cache, name, len, &flags, @@ -263,7 +266,7 @@ int has_dirs_only_path(const char *name, int len, int prefix_len) * 'prefix_len', thus we then allow for symlinks in the prefix part as * long as those points to real existing directories. */ -int threaded_has_dirs_only_path(struct cache_def *cache, const char *name, int len, int prefix_len) +static int threaded_has_dirs_only_path(struct cache_def *cache, const char *name, int len, int prefix_len) { return lstat_cache(cache, name, len, FL_DIR|FL_FULLPATH, prefix_len) & -- cgit v1.2.3 From 69850be47d1b629543a2c45e8dd254729c5676af Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sat, 15 Sep 2012 22:39:43 -0700 Subject: sha1-array.c: mark a private file-scope symbol as static Signed-off-by: Junio C Hamano --- Documentation/technical/api-sha1-array.txt | 3 --- sha1-array.c | 2 +- sha1-array.h | 1 - 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/Documentation/technical/api-sha1-array.txt b/Documentation/technical/api-sha1-array.txt index 4a4bae8109..45d1c517cd 100644 --- a/Documentation/technical/api-sha1-array.txt +++ b/Documentation/technical/api-sha1-array.txt @@ -25,9 +25,6 @@ Functions the array (but note that some operations below may lose this ordering). -`sha1_array_sort`:: - Sort the elements in the array. - `sha1_array_lookup`:: Perform a binary search of the array for a specific sha1. If found, returns the offset (in number of elements) of the diff --git a/sha1-array.c b/sha1-array.c index b2f47f98fb..6f4a2246c9 100644 --- a/sha1-array.c +++ b/sha1-array.c @@ -14,7 +14,7 @@ static int void_hashcmp(const void *a, const void *b) return hashcmp(a, b); } -void sha1_array_sort(struct sha1_array *array) +static void sha1_array_sort(struct sha1_array *array) { qsort(array->sha1, array->nr, sizeof(*array->sha1), void_hashcmp); array->sorted = 1; diff --git a/sha1-array.h b/sha1-array.h index 4499b5dad4..72bb33bec6 100644 --- a/sha1-array.h +++ b/sha1-array.h @@ -11,7 +11,6 @@ struct sha1_array { #define SHA1_ARRAY_INIT { NULL, 0, 0, 0 } void sha1_array_append(struct sha1_array *array, const unsigned char *sha1); -void sha1_array_sort(struct sha1_array *array); int sha1_array_lookup(struct sha1_array *array, const unsigned char *sha1); void sha1_array_clear(struct sha1_array *array); -- cgit v1.2.3 From ea03a8e181261b5efda10376ff160dc8df084104 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sat, 15 Sep 2012 22:43:15 -0700 Subject: strbuf.c: mark a private file-scope symbol as static Also remove an unused function. Signed-off-by: Junio C Hamano --- strbuf.c | 13 ++----------- strbuf.h | 4 ---- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/strbuf.c b/strbuf.c index ec88266718..0510f76c24 100644 --- a/strbuf.c +++ b/strbuf.c @@ -445,8 +445,8 @@ static int is_rfc3986_unreserved(char ch) ch == '-' || ch == '_' || ch == '.' || ch == '~'; } -void strbuf_add_urlencode(struct strbuf *sb, const char *s, size_t len, - int reserved) +static void strbuf_add_urlencode(struct strbuf *sb, const char *s, size_t len, + int reserved) { strbuf_grow(sb, len); while (len--) { @@ -465,15 +465,6 @@ void strbuf_addstr_urlencode(struct strbuf *sb, const char *s, strbuf_add_urlencode(sb, s, strlen(s), reserved); } -void strbuf_addf_ln(struct strbuf *sb, const char *fmt, ...) -{ - va_list ap; - va_start(ap, fmt); - strbuf_vaddf(sb, fmt, ap); - va_end(ap); - strbuf_addch(sb, '\n'); -} - int printf_ln(const char *fmt, ...) { int ret; diff --git a/strbuf.h b/strbuf.h index b888d405db..be941ee481 100644 --- a/strbuf.h +++ b/strbuf.h @@ -99,8 +99,6 @@ __attribute__((format (printf,2,3))) extern void strbuf_addf(struct strbuf *sb, const char *fmt, ...); __attribute__((format (printf,2,0))) extern void strbuf_vaddf(struct strbuf *sb, const char *fmt, va_list ap); -__attribute__((format (printf,2,3))) -extern void strbuf_addf_ln(struct strbuf *sb, const char *fmt, ...); extern void strbuf_add_lines(struct strbuf *sb, const char *prefix, const char *buf, size_t size); @@ -126,8 +124,6 @@ extern int launch_editor(const char *path, struct strbuf *buffer, const char *co extern int strbuf_branchname(struct strbuf *sb, const char *name); extern int strbuf_check_branch_ref(struct strbuf *sb, const char *name); -extern void strbuf_add_urlencode(struct strbuf *, const char *, size_t, - int reserved); extern void strbuf_addstr_urlencode(struct strbuf *, const char *, int reserved); -- cgit v1.2.3 From 357e9c69c9069b2764d1b58d0074945f8a33ff09 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sat, 15 Sep 2012 22:44:31 -0700 Subject: read-cache.c: mark a private file-scope symbol as static Signed-off-by: Junio C Hamano --- cache.h | 1 - read-cache.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/cache.h b/cache.h index c9739d4d45..032f6711c1 100644 --- a/cache.h +++ b/cache.h @@ -442,7 +442,6 @@ extern int discard_index(struct index_state *); extern int unmerged_index(const struct index_state *); extern int verify_path(const char *path); extern struct cache_entry *index_name_exists(struct index_state *istate, const char *name, int namelen, int igncase); -extern int index_name_stage_pos(const struct index_state *, const char *name, int namelen, int stage); extern int index_name_pos(const struct index_state *, const char *name, int namelen); #define ADD_CACHE_OK_TO_ADD 1 /* Ok to add */ #define ADD_CACHE_OK_TO_REPLACE 2 /* Ok to replace file/directory */ diff --git a/read-cache.c b/read-cache.c index 79e3bbe024..fda78bc353 100644 --- a/read-cache.c +++ b/read-cache.c @@ -424,7 +424,7 @@ int cache_name_compare(const char *name1, int len1, const char *name2, int len2) return cache_name_stage_compare(name1, len1, 0, name2, len2, 0); } -int index_name_stage_pos(const struct index_state *istate, const char *name, int namelen, int stage) +static int index_name_stage_pos(const struct index_state *istate, const char *name, int namelen, int stage) { int first, last; -- cgit v1.2.3 From 1e24845cc2265b616517aeb54fbe978f5ac0fa61 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sat, 15 Sep 2012 22:46:26 -0700 Subject: wt-status.c: mark a private file-scope symbol as static Signed-off-by: Junio C Hamano --- wt-status.c | 4 ++-- wt-status.h | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/wt-status.c b/wt-status.c index 4eeaf2396a..2a9658bad4 100644 --- a/wt-status.c +++ b/wt-status.c @@ -100,8 +100,8 @@ void status_printf(struct wt_status *s, const char *color, va_end(ap); } -void status_printf_more(struct wt_status *s, const char *color, - const char *fmt, ...) +static void status_printf_more(struct wt_status *s, const char *color, + const char *fmt, ...) { va_list ap; diff --git a/wt-status.h b/wt-status.h index f8fc58cc0a..236b41fd34 100644 --- a/wt-status.h +++ b/wt-status.h @@ -92,7 +92,5 @@ void status_printf_ln(struct wt_status *s, const char *color, const char *fmt, . ; void status_printf(struct wt_status *s, const char *color, const char *fmt, ...) ; -void status_printf_more(struct wt_status *s, const char *color, const char *fmt, ...) - __attribute__((format(printf, 3, 4))); #endif /* STATUS_H */ -- cgit v1.2.3 From cbfb93a12b7f60dcd0f5a0cd3f5f37ee694ecd3a Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sat, 15 Sep 2012 22:47:42 -0700 Subject: trace.c: mark a private file-scope symbol as static Signed-off-by: Junio C Hamano --- cache.h | 1 - trace.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/cache.h b/cache.h index 032f6711c1..bfa7189feb 100644 --- a/cache.h +++ b/cache.h @@ -1205,7 +1205,6 @@ extern void alloc_report(void); /* trace.c */ __attribute__((format (printf, 1, 2))) extern void trace_printf(const char *format, ...); -extern void trace_vprintf(const char *key, const char *format, va_list ap); __attribute__((format (printf, 2, 3))) extern void trace_argv_printf(const char **argv, const char *format, ...); extern void trace_repo_setup(const char *prefix); diff --git a/trace.c b/trace.c index d95341693f..5ec0e3bd16 100644 --- a/trace.c +++ b/trace.c @@ -62,7 +62,7 @@ static int get_trace_fd(const char *key, int *need_close) static const char err_msg[] = "Could not trace into fd given by " "GIT_TRACE environment variable"; -void trace_vprintf(const char *key, const char *fmt, va_list ap) +static void trace_vprintf(const char *key, const char *fmt, va_list ap) { struct strbuf buf = STRBUF_INIT; -- cgit v1.2.3 From dad148c35975923c7a13058c20e01bb587ace4ef Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sat, 15 Sep 2012 22:50:09 -0700 Subject: ident.c: mark private file-scope symbols as static Signed-off-by: Junio C Hamano --- cache.h | 2 -- ident.c | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/cache.h b/cache.h index bfa7189feb..a58df84bd3 100644 --- a/cache.h +++ b/cache.h @@ -901,9 +901,7 @@ extern const char *git_author_info(int); extern const char *git_committer_info(int); extern const char *fmt_ident(const char *name, const char *email, const char *date_str, int); extern const char *fmt_name(const char *name, const char *email); -extern const char *ident_default_name(void); extern const char *ident_default_email(void); -extern const char *ident_default_date(void); extern const char *git_editor(void); extern const char *git_pager(int stdout_is_tty); extern int git_ident_config(const char *, const char *, void *); diff --git a/ident.c b/ident.c index 484e0a9803..a4bf206e2f 100644 --- a/ident.c +++ b/ident.c @@ -93,7 +93,7 @@ static void copy_email(const struct passwd *pw, struct strbuf *email) add_domainname(email); } -const char *ident_default_name(void) +static const char *ident_default_name(void) { if (!git_default_name.len) { copy_gecos(xgetpwuid_self(), &git_default_name); @@ -117,7 +117,7 @@ const char *ident_default_email(void) return git_default_email.buf; } -const char *ident_default_date(void) +static const char *ident_default_date(void) { if (!git_default_date[0]) datestamp(git_default_date, sizeof(git_default_date)); -- cgit v1.2.3 From 250f2492a408be1ed79c563f304a0d43752d032c Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sat, 15 Sep 2012 23:20:40 -0700 Subject: sequencer.c: mark a private file-scope symbol as static Signed-off-by: Junio C Hamano --- sequencer.c | 2 +- sequencer.h | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/sequencer.c b/sequencer.c index f86f116a15..ce8a59f576 100644 --- a/sequencer.c +++ b/sequencer.c @@ -17,7 +17,7 @@ #define GIT_REFLOG_ACTION "GIT_REFLOG_ACTION" -void remove_sequencer_state(void) +static void remove_sequencer_state(void) { struct strbuf seq_dir = STRBUF_INIT; diff --git a/sequencer.h b/sequencer.h index d8494201e0..99eb7fa090 100644 --- a/sequencer.h +++ b/sequencer.h @@ -44,9 +44,6 @@ struct replay_opts { struct rev_info *revs; }; -/* Removes SEQ_DIR. */ -extern void remove_sequencer_state(void); - int sequencer_pick_revisions(struct replay_opts *opts); #endif -- cgit v1.2.3