fix: Use None as the working directory for GitRepo in base_coder.py

This commit is contained in:
Paul Gauthier 2024-08-01 15:25:57 -03:00 committed by Paul Gauthier (aider)
parent 283ac13d2c
commit dec8425236
2 changed files with 15 additions and 12 deletions

View file

@ -276,7 +276,7 @@ class Coder:
self.repo = GitRepo(
self.io,
fnames,
".",
None,
models=main_model.commit_message_models(),
)
except FileNotFoundError:

View file

@ -460,17 +460,20 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
repo = None
if args.git:
repo = GitRepo(
io,
fnames,
git_dname or ".",
args.aiderignore,
models=main_model.commit_message_models(),
attribute_author=args.attribute_author,
attribute_committer=args.attribute_committer,
attribute_commit_message=args.attribute_commit_message,
commit_prompt=args.commit_prompt,
)
try:
repo = GitRepo(
io,
fnames,
git_dname or ".",
args.aiderignore,
models=main_model.commit_message_models(),
attribute_author=args.attribute_author,
attribute_committer=args.attribute_committer,
attribute_commit_message=args.attribute_commit_message,
commit_prompt=args.commit_prompt,
)
except FileNotFoundError:
pass
from aider.coders import Coder
from aider.commands import Commands