mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-21 18:03:54 +00:00
Fix directory finding for attrs
The fix to support attrs on bare repos went a little too far in trying to avoid using the working directory and ended up not processing the input path quite correctly.
This commit is contained in:
parent
df0c89534d
commit
cba285d32f
@ -450,11 +450,11 @@ static int collect_attr_files(
|
|||||||
git_vector_init(files, 4, NULL) < 0)
|
git_vector_init(files, 4, NULL) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
/* given a unrooted path in a non-bare repo, resolve it */
|
/* Resolve path in a non-bare repo */
|
||||||
if (workdir && git_path_root(path) < 0)
|
if (workdir != NULL)
|
||||||
error = git_path_find_dir(&dir, path, workdir);
|
error = git_path_find_dir(&dir, path, workdir);
|
||||||
else
|
else
|
||||||
error = git_buf_sets(&dir, path);
|
error = git_path_dirname_r(&dir, path);
|
||||||
if (error < 0)
|
if (error < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user