This commit is contained in:
proletarius101 2024-04-06 22:30:50 +08:00
parent d79ac8e2dc
commit c148ea3d8e
No known key found for this signature in database
1 changed files with 6 additions and 0 deletions

View File

@ -525,6 +525,9 @@ def update_servergitmirrors(servergitmirrors, repo_section):
if not branch_name in repo.heads:
repo.create_head(branch_name, initial_branch_ref)
repo.head.reference = repo.heads[branch_name]
# test
print(repo.git.status())
remote_url = d['url']
name = REMOTE_HOSTNAME_REGEX.sub(r'\1', remote_url)
@ -539,6 +542,9 @@ def update_servergitmirrors(servergitmirrors, repo_section):
logging.info('Mirroring to: ' + remote_url)
if index_only:
# test
print(glob.glob('.' + '/**/*', recursive=True))
logging.debug('Adding index files to git mirror')
repo.index.add(_get_index_file_paths(repo_section))
else: