diff options
author | Sven Strickroth <email@cs-ware.de> | 2019-06-29 16:19:08 +0200 |
---|---|---|
committer | Sven Strickroth <email@cs-ware.de> | 2019-07-04 10:28:33 +0200 |
commit | 18a6d9f3a82d2363ed45713a47f48ac8f383bb41 (patch) | |
tree | ce2e73b0c70ffd68ebbff2d65c3cc3855c6a8383 | |
parent | c4c1500a8bc99066cbb4340717d91020c02a75ae (diff) | |
download | libgit2-18a6d9f3a82d2363ed45713a47f48ac8f383bb41.tar.gz |
attr: Don't fail in attr_setup if there exists a system attributes file
Regression introduced in commit 5452e49fce21f726bec19519da7f012e3f19e736 on PR #4967.
Signed-off-by: Sven Strickroth <email@cs-ware.de>
-rw-r--r-- | src/attr.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/attr.c b/src/attr.c index f50d28c1e..877bc873b 100644 --- a/src/attr.c +++ b/src/attr.c @@ -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) { |