mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-08 13:44:59 +00:00
catch all git errors
This commit is contained in:
parent
72c9ac460b
commit
5a6f7b3cd1
5 changed files with 9 additions and 11 deletions
|
@ -1784,7 +1784,7 @@ class Coder:
|
|||
self.reflected_message = str(err)
|
||||
return edited
|
||||
|
||||
except git.exc.ODBError as err:
|
||||
except (git.exc.ODBError, git.exc.GitError) as err:
|
||||
self.io.tool_error(str(err))
|
||||
return edited
|
||||
except Exception as err:
|
||||
|
|
|
@ -484,7 +484,7 @@ def git_cherry_pick_osr_onto_o(texts):
|
|||
# cherry pick R onto original
|
||||
try:
|
||||
repo.git.cherry_pick(replace_hash, "--minimal")
|
||||
except git.exc.ODBError:
|
||||
except (git.exc.ODBError, git.exc.GitError):
|
||||
# merge conflicts!
|
||||
return
|
||||
|
||||
|
@ -522,7 +522,7 @@ def git_cherry_pick_sr_onto_so(texts):
|
|||
# cherry pick replace onto original
|
||||
try:
|
||||
repo.git.cherry_pick(replace_hash, "--minimal")
|
||||
except git.exc.ODBError:
|
||||
except (git.exc.ODBError, git.exc.GitError):
|
||||
# merge conflicts!
|
||||
return
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue