1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-09-21 04:10:37 +02:00

fix(deploy): Reference at 'refs/heads/full' does already exist

This commit is contained in:
proletarius101 2024-04-06 16:10:00 +08:00
parent d2ada6e418
commit 5e0980b98a
No known key found for this signature in database

View File

@ -511,13 +511,15 @@ def update_servergitmirrors(servergitmirrors, repo_section):
enabled_remotes = [] enabled_remotes = []
for d in servergitmirrors: for d in servergitmirrors:
index_only = d.get('index_only', False) index_only = d.get('index_only', False)
# Use a separate branch for the index only mode as it needs a different set of files to commit
if index_only: if index_only:
# Use a separate branch for the index only mode as it needs a different set of files to commit branch_name = 'index_only'
repo.create_head('index_only', initial_branch_ref)
repo.heads.index_only.checkout()
else: else:
repo.create_head('full', initial_branch_ref) branch_name = 'full'
repo.heads.full.checkout() if not branch_name in repo.heads:
repo.create_head(branch_name, initial_branch_ref)
repo.heads[branch_name].checkout()
remote_url = d['url'] remote_url = d['url']
name = REMOTE_HOSTNAME_REGEX.sub(r'\1', remote_url) name = REMOTE_HOSTNAME_REGEX.sub(r'\1', remote_url)