mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-25 23:05:00 +00:00
catch all git.exc.ODBError
This commit is contained in:
parent
c32a991b2c
commit
72c9ac460b
5 changed files with 9 additions and 9 deletions
|
@ -71,9 +71,7 @@ class GitRepo:
|
|||
repo_path = git.Repo(fname, search_parent_directories=True).working_dir
|
||||
repo_path = utils.safe_abs_path(repo_path)
|
||||
repo_paths.append(repo_path)
|
||||
except git.exc.InvalidGitRepositoryError:
|
||||
pass
|
||||
except git.exc.NoSuchPathError:
|
||||
except git.exc.ODBError:
|
||||
pass
|
||||
|
||||
num_repos = len(set(repo_paths))
|
||||
|
@ -207,7 +205,7 @@ class GitRepo:
|
|||
try:
|
||||
commits = self.repo.iter_commits(active_branch)
|
||||
current_branch_has_commits = any(commits)
|
||||
except git.exc.GitCommandError:
|
||||
except git.exc.ODBError:
|
||||
pass
|
||||
except TypeError:
|
||||
pass
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue