1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-11-19 21:30:10 +01:00

Don't fail fdroid update on empty repository

Steps to reproduce:

$ git init
$ fdroid update --create-key
This commit is contained in:
Jochen Sprickerhof 2021-08-03 11:38:24 +02:00 committed by Hans-Christoph Steiner
parent bbda73f6c7
commit cacbe88b8c

View File

@ -892,7 +892,10 @@ def write_status_json(output, pretty=False, name=None):
def get_head_commit_id(git_repo):
"""Get git commit ID for HEAD as a str."""
return git_repo.head.commit.hexsha
try:
return git_repo.head.commit.hexsha
except ValueError:
return "None"
def setup_vcs(app):