~edwargix/git.sr.ht

f83ec15d3d5c3c4bd904aa39d1d8601ff0163743 — Drew DeVault 6 years ago 75e14a0
Fix this dumb fucking archive endpoint
1 files changed, 2 insertions(+), 2 deletions(-)

M gitsrht/blueprints/repo.py
M gitsrht/blueprints/repo.py => gitsrht/blueprints/repo.py +2 -2
@@ 174,7 174,7 @@ def raw_blob(owner, repo, ref, path):
    return send_file(BytesIO(blob.data),
            as_attachment=blob.is_binary, attachment_filename=entry.name)

@repo.route("/<owner>/<repo>/archive/<ref>")
@repo.route("/<owner>/<repo>/archive/<ref>.tar.gz")
def archive(owner, repo, ref):
    owner, repo = get_repo(owner, repo)
    if not repo:


@@ 194,7 194,7 @@ def archive(owner, repo, ref):
            "--git-dir", repo.path,
            "archive",
            "--format=tar.gz",
            "--prefix", f"{repo.name}-{ref}",
            "--prefix", f"{repo.name}-{ref}/",
            "-o", path, ref
        ]
        print(args)