mirror of
https://github.com/karma-riuk/crab.git
synced 2025-07-05 13:38:12 +02:00
found out that some couldn't checkout due to
conflicts, but if you force it, it works
This commit is contained in:
@ -122,7 +122,7 @@ def checkout(repo_path: str, sha: str, pr_number: int) -> None:
|
|||||||
raise CantEnsureFullHistoryError(e.stderr)
|
raise CantEnsureFullHistoryError(e.stderr)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
run_git_cmd(["checkout", sha], repo_path)
|
run_git_cmd(["checkout", "-f", sha], repo_path)
|
||||||
except subprocess.CalledProcessError:
|
except subprocess.CalledProcessError:
|
||||||
try:
|
try:
|
||||||
run_git_cmd(["fetch", "origin", f"pull/{pr_number}/merge"], repo_path)
|
run_git_cmd(["fetch", "origin", f"pull/{pr_number}/merge"], repo_path)
|
||||||
@ -130,7 +130,7 @@ def checkout(repo_path: str, sha: str, pr_number: int) -> None:
|
|||||||
raise CantFetchPRError(e.stderr)
|
raise CantFetchPRError(e.stderr)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
run_git_cmd(["checkout", sha], repo_path)
|
run_git_cmd(["checkout", "-f", sha], repo_path)
|
||||||
except subprocess.CalledProcessError as e:
|
except subprocess.CalledProcessError as e:
|
||||||
raise CantCheckoutCommitError(e.stderr)
|
raise CantCheckoutCommitError(e.stderr)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user