attr: ensure lookups are on repo-relative paths Attribute lookups are done on paths relative to the repository. Fail if erroneously presented with an absolute path.
diff --git a/src/attr.c b/src/attr.c
index 14eab5b..cd704a4 100644
--- a/src/attr.c
+++ b/src/attr.c
@@ -629,6 +629,8 @@ static int collect_attr_files(
const char *workdir = git_repository_workdir(repo);
attr_walk_up_info info = { NULL };
+ GIT_ASSERT(!git_path_is_absolute(path));
+
if ((error = attr_setup(repo, attr_session, opts)) < 0)
return error;