Commit 18a6d9f3 by Sven Strickroth

attr: Don't fail in attr_setup if there exists a system attributes file

Regression introduced in commit 5452e49f on PR #4967.

Signed-off-by: Sven Strickroth <email@cs-ware.de>
parent c4c1500a
......@@ -333,6 +333,7 @@ static int attr_setup(git_repository *repo, git_attr_session *attr_session)
NULL, git_repository_attr_cache(repo)->cfg_attr_file)) < 0)
goto out;
git_buf_clear(&path); /* git_repository_item_path expects an empty buffer, because it uses git_buf_set */
if ((error = git_repository_item_path(&path, repo, GIT_REPOSITORY_ITEM_INFO)) < 0 ||
(error = preload_attr_file(repo, attr_session, GIT_ATTR_FILE__FROM_FILE,
path.ptr, GIT_ATTR_FILE_INREPO)) < 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment