1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-11-14 19:10:11 +01: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 committed by Hans-Christoph Steiner
parent 250f89d23e
commit ad16452abe

View File

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