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
4acab21d81
commit
3e67622736
@ -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
|
||||
from shlex import split
|
||||
import shutil
|
||||
@ -37,6 +38,7 @@ from . import index
|
||||
from .exception import FDroidException
|
||||
|
||||
config = None
|
||||
options: Optional[Namespace] = None
|
||||
start_timestamp = time.gmtime()
|
||||
|
||||
GIT_BRANCH = 'master'
|
||||
@ -685,7 +687,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:
|
||||
@ -775,6 +777,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