summaryrefslogtreecommitdiff
path: root/setup.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-08-25 16:00:20 -0700
committerJunio C Hamano <gitster@pobox.com>2011-08-25 16:00:20 -0700
commite11fa9a460b51947c3ef28be84346a1e90d027ca (patch)
treef1c218291b20b8ee96b57e4342e6d053a9e72428 /setup.c
parent957450054cfbbe0d4ae8d33f7b74eace6e290f16 (diff)
parent068762846634dff73a18d71188736e0ded03a1cc (diff)
downloadgit-e11fa9a460b51947c3ef28be84346a1e90d027ca.tar.gz
Merge branch 'di/parse-options-split'
* di/parse-options-split: Reduce parse-options.o dependencies parse-options: export opterr, optbug
Diffstat (limited to 'setup.c')
-rw-r--r--setup.c28
1 files changed, 0 insertions, 28 deletions
diff --git a/setup.c b/setup.c
index 2c51a9a4c7..ca7ee496e5 100644
--- a/setup.c
+++ b/setup.c
@@ -40,34 +40,6 @@ char *prefix_path(const char *prefix, int len, const char *path)
return sanitized;
}
-/*
- * Unlike prefix_path, this should be used if the named file does
- * not have to interact with index entry; i.e. name of a random file
- * on the filesystem.
- */
-const char *prefix_filename(const char *pfx, int pfx_len, const char *arg)
-{
- static char path[PATH_MAX];
-#ifndef WIN32
- if (!pfx_len || is_absolute_path(arg))
- return arg;
- memcpy(path, pfx, pfx_len);
- strcpy(path + pfx_len, arg);
-#else
- char *p;
- /* don't add prefix to absolute paths, but still replace '\' by '/' */
- if (is_absolute_path(arg))
- pfx_len = 0;
- else if (pfx_len)
- memcpy(path, pfx, pfx_len);
- strcpy(path + pfx_len, arg);
- for (p = path + pfx_len; *p; p++)
- if (*p == '\\')
- *p = '/';
-#endif
- return path;
-}
-
int check_filename(const char *prefix, const char *arg)
{
const char *name;