Clear error to avoid leaving invalid error behind
diff --git a/src/attr.c b/src/attr.c
index 95d63be..1b41441 100644
--- a/src/attr.c
+++ b/src/attr.c
@@ -572,8 +572,10 @@ static int collect_attr_files(
error = git_futils_find_system_file(&dir, GIT_ATTR_FILE_SYSTEM);
if (!error)
error = push_attr_file(repo, files, NULL, dir.ptr);
- else if (error == GIT_ENOTFOUND)
+ else if (error == GIT_ENOTFOUND) {
+ giterr_clear();
error = 0;
+ }
}
cleanup: