mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-04 22:40:29 +03:00
checkupdates: don't create branch with .lock end
This commit is contained in:
parent
e538c34c32
commit
243a0475f9
1 changed files with 8 additions and 0 deletions
|
|
@ -769,6 +769,10 @@ def push_commits(branch_name='checkupdates'):
|
||||||
* https://docs.gitlab.com/ee/user/project/push_options.html
|
* https://docs.gitlab.com/ee/user/project/push_options.html
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
if branch_name != "checkupdates":
|
||||||
|
if callable(getattr(git.SymbolicReference, "_check_ref_name_valid", None)):
|
||||||
|
git.SymbolicReference._check_ref_name_valid(branch_name)
|
||||||
|
|
||||||
git_repo = git.Repo.init('.')
|
git_repo = git.Repo.init('.')
|
||||||
upstream_main = get_upstream_main_branch(git_repo)
|
upstream_main = get_upstream_main_branch(git_repo)
|
||||||
files = set()
|
files = set()
|
||||||
|
|
@ -783,6 +787,10 @@ def push_commits(branch_name='checkupdates'):
|
||||||
if not files:
|
if not files:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
# https://git-scm.com/docs/git-check-ref-format Git refname can't end with .lock
|
||||||
|
if branch_name.endswith(".lock"):
|
||||||
|
branch_name = f"{branch_name}_"
|
||||||
|
|
||||||
remote = git_repo.remotes.origin
|
remote = git_repo.remotes.origin
|
||||||
if branch_name in remote.refs:
|
if branch_name in remote.refs:
|
||||||
if not get_changes_versus_ref(git_repo, f'origin/{branch_name}', files[0]):
|
if not get_changes_versus_ref(git_repo, f'origin/{branch_name}', files[0]):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue