mirror of
https://git.proxmox.com/git/libgit2
synced 2025-06-23 21:16:32 +00:00
checkout::tree tests: don't use static buffer
This commit is contained in:
parent
33cad99589
commit
b4d183a77a
@ -989,15 +989,18 @@ void test_checkout_tree__filemode_preserved_in_index(void)
|
||||
|
||||
mode_t read_filemode(const char *path)
|
||||
{
|
||||
git_buf fullpath = GIT_BUF_INIT;
|
||||
struct stat st;
|
||||
char pathabs[256] = {0};
|
||||
mode_t result;
|
||||
|
||||
strcat(pathabs, clar_sandbox_path());
|
||||
strcat(pathabs, "/testrepo/");
|
||||
strcat(pathabs, path);
|
||||
cl_must_pass(p_stat(pathabs, &st));
|
||||
git_buf_joinpath(&fullpath, "testrepo", path);
|
||||
cl_must_pass(p_stat(fullpath.ptr, &st));
|
||||
|
||||
return st.st_mode;
|
||||
result = GIT_PERMS_IS_EXEC(st.st_mode) ? 0100755 : 0100644;
|
||||
|
||||
git_buf_free(&fullpath);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
void test_checkout_tree__filemode_preserved_in_workdir(void)
|
||||
|
Loading…
Reference in New Issue
Block a user