1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-09-21 04:10:37 +02:00
This commit is contained in:
proletarius101 2024-04-06 17:09:31 +08:00
parent cd23cf659b
commit 31f9919073
No known key found for this signature in database

View File

@ -519,7 +519,7 @@ def update_servergitmirrors(servergitmirrors, repo_section):
branch_name = 'full' branch_name = 'full'
if not branch_name in repo.heads: if not branch_name in repo.heads:
repo.create_head(branch_name, initial_branch_ref) repo.create_head(branch_name, initial_branch_ref)
repo.heads[branch_name].checkout() repo.head.reference = repo.heads[branch_name]
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)
@ -556,6 +556,9 @@ def update_servergitmirrors(servergitmirrors, repo_section):
% (common.GITLAB_COM_PAGES_MAX_SIZE / 1000000000) % (common.GITLAB_COM_PAGES_MAX_SIZE / 1000000000)
) )
# Test
print(repo.head.log())
# push. This will overwrite the git history # push. This will overwrite the git history
remote = repo.remote(name) remote = repo.remote(name)
if remote.name == 'gitlab': if remote.name == 'gitlab':
@ -603,7 +606,6 @@ def update_servergitmirrors(servergitmirrors, repo_section):
repo.head.reference = initial_branch_ref repo.head.reference = initial_branch_ref
repo.head.reset(index=True, working_tree=False) repo.head.reset(index=True, working_tree=False)
repo.delete_head(repo.branches[branch_name], force=True) repo.delete_head(repo.branches[branch_name], force=True)
if progress: if progress:
progressbar.done() progressbar.done()