archive: decode ref name
1 files changed, 2 insertions(+), 1 deletions(-) M gitsrht/blueprints/repo.py
M gitsrht/blueprints/repo.py => gitsrht/blueprints/repo.py +2 -1
@@ 350,12 350,13 @@ def archive(owner, repo, ref): if not isinstance(commit, pygit2.Commit): abort(404) refname = ref.decode('utf-8', 'replace') args = [ "git", "--git-dir", repo.path, "archive", "--format=tar.gz", "--prefix", f"{repo.name}-{ref}/", "--prefix", f"{repo.name}-{refname}/", ref ] subp = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=sys.stderr)