use git.exc not gitdb.exc

This commit is contained in:
Paul Gauthier 2024-08-31 08:21:07 -07:00
parent 01964ca294
commit c32a991b2c
2 changed files with 2 additions and 4 deletions

View file

@ -3,7 +3,6 @@ import time
from pathlib import Path, PurePosixPath
import git
import gitdb
import pathspec
from aider import prompts, utils
@ -376,7 +375,7 @@ class GitRepo:
def get_head_commit(self):
try:
return self.repo.head.commit
except (ValueError, gitdb.exc.ODBError):
except (ValueError, git.exc.ODBError):
return None
def get_head_commit_sha(self, short=False):