fix: remove more locks
All checks were successful
build / trigger-build-image (push) Successful in 14s
All checks were successful
build / trigger-build-image (push) Successful in 14s
This commit is contained in:
parent
65a8a5d130
commit
2c1123892c
|
@ -90,6 +90,11 @@ class Git:
|
||||||
retry_interval = 2
|
retry_interval = 2
|
||||||
while retry_interval and auto_retry:
|
while retry_interval and auto_retry:
|
||||||
try:
|
try:
|
||||||
|
current_branch = ""
|
||||||
|
if repo.head.is_detached:
|
||||||
|
current_branch = repo.head.commit.hexsha
|
||||||
|
else:
|
||||||
|
current_branch = repo.active_branch.name
|
||||||
if clean_git_lock:
|
if clean_git_lock:
|
||||||
lock_files = [
|
lock_files = [
|
||||||
"index.lock",
|
"index.lock",
|
||||||
|
@ -98,7 +103,7 @@ class Git:
|
||||||
"logs/HEAD.lock",
|
"logs/HEAD.lock",
|
||||||
"packed-refs.lock",
|
"packed-refs.lock",
|
||||||
"config.lock",
|
"config.lock",
|
||||||
f"{checkout_dest}.lock",
|
f"refs/remotes/origin/{current_branch}.lock",
|
||||||
]
|
]
|
||||||
for lock_file in lock_files:
|
for lock_file in lock_files:
|
||||||
lock_path = os.path.join(repo_dir, ".git", lock_file)
|
lock_path = os.path.join(repo_dir, ".git", lock_file)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user