summaryrefslogtreecommitdiff
path: root/symlinks.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-09-18 14:37:46 -0700
committerJunio C Hamano <gitster@pobox.com>2012-09-18 14:37:46 -0700
commit06e211acc61c52a2e1709ea8b62a0b0f6dcb492b (patch)
treef69ccce2499e864ed3c0a6c71c7aec4b5d3a61f6 /symlinks.c
parent8db3865936550fe239b11a44ed52230c3c3eb223 (diff)
parent250f2492a408be1ed79c563f304a0d43752d032c (diff)
downloadgit-06e211acc61c52a2e1709ea8b62a0b0f6dcb492b.tar.gz
Merge branch 'jc/make-static'
Turn many file-scope private symbols to static to reduce the global namespace contamination. * jc/make-static: sequencer.c: mark a private file-scope symbol as static ident.c: mark private file-scope symbols as static trace.c: mark a private file-scope symbol as static wt-status.c: mark a private file-scope symbol as static read-cache.c: mark a private file-scope symbol as static strbuf.c: mark a private file-scope symbol as static sha1-array.c: mark a private file-scope symbol as static symlinks.c: mark private file-scope symbols as static notes.c: mark a private file-scope symbol as static rerere.c: mark private file-scope symbols as static graph.c: mark private file-scope symbols as static diff.c: mark a private file-scope symbol as static commit.c: mark a file-scope private symbol as static builtin/notes.c: mark file-scope private symbols as static
Diffstat (limited to 'symlinks.c')
-rw-r--r--symlinks.c7
1 files changed, 5 insertions, 2 deletions
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) &