summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2020-04-05 13:24:13 +0200
committerGitHub <noreply@github.com>2020-04-05 13:24:13 +0200
commite9b0cfc006ceebda563d1084b1cb6604ac13a15f (patch)
treec78db8b7fb2ce4cb7fc2bda0baf88232204230f7
parente56d48be21804634573ae4f0992f0b3355be4dfc (diff)
parentb6f18db917a89459f3344398737e201677e5658c (diff)
downloadlibgit2-e9b0cfc006ceebda563d1084b1cb6604ac13a15f.tar.gz
Merge pull request #5485 from libgit2/ethomson/sysdir_unused
sysdir: remove unused git_sysdir_get_str
-rw-r--r--src/sysdir.c19
-rw-r--r--src/sysdir.h11
2 files changed, 0 insertions, 30 deletions
diff --git a/src/sysdir.c b/src/sysdir.c
index 9e86dc88c..bcef97c03 100644
--- a/src/sysdir.c
+++ b/src/sysdir.c
@@ -216,25 +216,6 @@ int git_sysdir_get(const git_buf **out, git_sysdir_t which)
return 0;
}
-int git_sysdir_get_str(
- char *out,
- size_t outlen,
- git_sysdir_t which)
-{
- const git_buf *path = NULL;
-
- GIT_ERROR_CHECK_ERROR(git_sysdir_check_selector(which));
- GIT_ERROR_CHECK_ERROR(git_sysdir_get(&path, which));
-
- if (!out || path->size >= outlen) {
- git_error_set(GIT_ERROR_NOMEMORY, "buffer is too short for the path");
- return GIT_EBUFS;
- }
-
- git_buf_copy_cstr(out, outlen, path);
- return 0;
-}
-
#define PATH_MAGIC "$PATH"
int git_sysdir_set(git_sysdir_t which, const char *search_path)
diff --git a/src/sysdir.h b/src/sysdir.h
index ce1b4dc71..cc5599e38 100644
--- a/src/sysdir.h
+++ b/src/sysdir.h
@@ -94,17 +94,6 @@ extern int git_sysdir_global_init(void);
extern int git_sysdir_get(const git_buf **out, git_sysdir_t which);
/**
- * Get search path into a preallocated buffer
- *
- * @param out String buffer to write into
- * @param outlen Size of string buffer
- * @param which Which search path to return
- * @return 0 on success, GIT_EBUFS if out is too small, <0 on other failure
- */
-
-extern int git_sysdir_get_str(char *out, size_t outlen, git_sysdir_t which);
-
-/**
* Set search paths for global/system/xdg files
*
* The first occurrence of the magic string "$PATH" in the new value will