mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-09-21 04:10:37 +02:00
fix: index only mode setting doesn't work if it follows a full mode config
This commit is contained in:
parent
2d267e6cbd
commit
96d1f4190f
@ -25,8 +25,9 @@ import re
|
||||
import subprocess
|
||||
import time
|
||||
import urllib
|
||||
from git import Optional
|
||||
import yaml
|
||||
from argparse import ArgumentParser
|
||||
from argparse import ArgumentParser, Namespace
|
||||
import logging
|
||||
import shutil
|
||||
|
||||
@ -36,7 +37,7 @@ from . import index
|
||||
from .exception import FDroidException
|
||||
|
||||
config = None
|
||||
options = None
|
||||
options: Optional[Namespace] = None
|
||||
start_timestamp = time.gmtime()
|
||||
|
||||
GIT_BRANCH = 'master'
|
||||
@ -502,7 +503,7 @@ def update_servergitmirrors(servergitmirrors, repo_section):
|
||||
progress = None
|
||||
|
||||
repo = git.Repo.init(git_mirror_path, initial_branch=GIT_BRANCH)
|
||||
initial_commit_ref = repo.head.ref
|
||||
initial_commit_ref = repo.head.commit
|
||||
|
||||
enabled_remotes = []
|
||||
for d in servergitmirrors:
|
||||
@ -585,6 +586,7 @@ def update_servergitmirrors(servergitmirrors, repo_section):
|
||||
else:
|
||||
logging.debug(remote.url + ': ' + pushinfo.summary)
|
||||
|
||||
# Reset the repository to the initial commit so we can choose which files to commit to the next remote
|
||||
repo.head.reset(initial_commit_ref, index=True, working_tree=True)
|
||||
|
||||
if progress:
|
||||
|
Loading…
Reference in New Issue
Block a user