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.repo = GitRepo(
self.io, self.io,
fnames, fnames,
".", None,
models=main_model.commit_message_models(), models=main_model.commit_message_models(),
) )
except FileNotFoundError: 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 repo = None
if args.git: if args.git:
repo = GitRepo( try:
io, repo = GitRepo(
fnames, io,
git_dname or ".", fnames,
args.aiderignore, git_dname or ".",
models=main_model.commit_message_models(), args.aiderignore,
attribute_author=args.attribute_author, models=main_model.commit_message_models(),
attribute_committer=args.attribute_committer, attribute_author=args.attribute_author,
attribute_commit_message=args.attribute_commit_message, attribute_committer=args.attribute_committer,
commit_prompt=args.commit_prompt, attribute_commit_message=args.attribute_commit_message,
) commit_prompt=args.commit_prompt,
)
except FileNotFoundError:
pass
from aider.coders import Coder from aider.coders import Coder
from aider.commands import Commands from aider.commands import Commands