Only warn once about non-files being excluded from the repo map #281

This commit is contained in:
Paul Gauthier 2023-10-18 10:15:07 -07:00
parent 4f9d778d09
commit bf154b548e

View file

@ -76,6 +76,8 @@ class RepoMap:
cache_missing = False
warned_files = set()
def __init__(
self,
map_tokens=1024,
@ -307,7 +309,10 @@ class RepoMap:
for fname in fnames:
if not Path(fname).is_file():
self.io.tool_error(f"Repo-map can't include {fname}")
if fname not in self.warned_files:
self.io.tool_error(f"Repo-map can't include {fname}")
self.warned_files.add(fname)
continue
# dump(fname)