mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-07 23:19:28 +00:00
Fixed missing method
Signed-off-by: Sven Strickroth <email@cs-ware.de>
This commit is contained in:
parent
407cf4e414
commit
d7940ac3e4
22
src/config.c
22
src/config.c
@ -483,6 +483,28 @@ int git_config_find_global(char *global_config_path, size_t length)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int git_config_find_xdr(char *xdr_config_path, size_t length)
|
||||||
|
{
|
||||||
|
git_buf path = GIT_BUF_INIT;
|
||||||
|
int ret = git_config_find_xdr_r(&path);
|
||||||
|
|
||||||
|
if (ret < 0) {
|
||||||
|
git_buf_free(&path);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (path.size >= length) {
|
||||||
|
git_buf_free(&path);
|
||||||
|
giterr_set(GITERR_NOMEMORY,
|
||||||
|
"Path is to long to fit on the given buffer");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
git_buf_copy_cstr(xdr_config_path, length, &path);
|
||||||
|
git_buf_free(&path);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
int git_config_find_system_r(git_buf *path)
|
int git_config_find_system_r(git_buf *path)
|
||||||
{
|
{
|
||||||
return git_futils_find_system_file(path, GIT_CONFIG_FILENAME_SYSTEM);
|
return git_futils_find_system_file(path, GIT_CONFIG_FILENAME_SYSTEM);
|
||||||
|
Loading…
Reference in New Issue
Block a user