我编写了一个自动化代码来通过 git python 库应用 git 补丁。但是我想知道是否有可能应用了一些补丁,而有些补丁会出错。
try:
repo.git.execute(["git", "am", "patch")
except Exception as e:
for stat in status:
stat.update({"status": "failure"})
repo.git.execute(["git", "am", "--abort"])
return status