Added --no-git

This commit is contained in:
Paul Gauthier 2023-06-23 13:44:24 -07:00
parent 5c432592cd
commit b5b0c1cbc2
2 changed files with 11 additions and 1 deletions

View file

@ -90,6 +90,7 @@ class Coder:
verbose=False,
assistant_output_color="blue",
stream=True,
use_git=True,
):
self.verbose = verbose
self.abs_fnames = set()
@ -123,6 +124,7 @@ class Coder:
self.commands = Commands(self.io, self)
if use_git:
self.set_repo(fnames)
if self.repo:

View file

@ -118,6 +118,13 @@ def main(args=None, input=None, output=None):
default=True,
help="Disable streaming responses",
)
parser.add_argument(
"--no-git",
action="store_false",
dest="git",
default=True,
help="Do not look for a git repo",
)
parser.add_argument(
"--user-input-color",
default="green",
@ -265,6 +272,7 @@ def main(args=None, input=None, output=None):
verbose=args.verbose,
assistant_output_color=args.assistant_output_color,
stream=args.stream,
use_git=args.git,
)
if args.dirty_commits: