From 36fa7733768bf66be3cdcc4fb2f8916c0660a5bc Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Wed, 11 Sep 2024 14:38:23 -0700 Subject: [PATCH] fix: Simplify get_help_md function in commands.py --- aider/commands.py | 6 +----- aider/main.py | 4 ++++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/aider/commands.py b/aider/commands.py index e819bacc0..e6035ad10 100644 --- a/aider/commands.py +++ b/aider/commands.py @@ -1187,11 +1187,7 @@ def parse_quoted_filenames(args): def get_help_md(): - from aider.coders import Coder - from aider.models import Model - - coder = Coder(Model("gpt-3.5-turbo"), None) - md = coder.commands.get_help_md() + md = Commands(None, None).get_help_md() return md diff --git a/aider/main.py b/aider/main.py index b2d0e9d97..293b6cbff 100644 --- a/aider/main.py +++ b/aider/main.py @@ -300,6 +300,10 @@ def sanity_check_repo(repo, io): if not repo: return True + if not repo.repo.working_tree_dir: + io.tool_error("The git repo does not seem to have a working tree?") + return False + try: repo.get_tracked_files() if not repo.git_repo_error: