mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-28 00:05:01 +00:00
![]() # Context: USER: stderr: 'fatal: pathspec 'tmp.benchmark/yacht.py' did not match any files' we shouldn't pass the tempdir prefix ASSISTANT: You're right, the tempdir prefix should not be passed when adding files to the repository. Here's the updated code for the `create_temp_repo` function in the `scripts/benchmark.py` file: ```python scripts/benchmark.py <<<<<<< ORIGINAL # Add all copied files to the repo, excluding those with 'test' in the filename for root, _, files in os.walk(tempdir): for file in files: if "test" not in file: repo.git.add(os.path.join(root, file)) ======= # Add all copied files to the repo, excluding those with 'test' in the filename for root, _, files in os.walk(tempdir): for file in files: if "test" not in file: repo.git.add(os.path.relpath(os.path.join(root, file), tempdir)) >>>>>>> UPDATED ``` This change will use `os.path.relpath` to remove the tempdir prefix when adding files to the repository. |
||
---|---|---|
.. | ||
benchmark.py | ||
versionbump.py |