~edwargix/git.sr.ht

3e215eae97079094f54e2502586ce513fd977d0a — Drew DeVault 8 years ago aab7050
Remove git:// clone URL for empty repos
1 files changed, 2 insertions(+), 0 deletions(-)

M gitsrht/blueprints/public.py
M gitsrht/blueprints/public.py => gitsrht/blueprints/public.py +2 -0
@@ 32,6 32,8 @@ def cgit_passthrough(user, repo, cgit_path):
        ("https://{}/~{}/{}",),
        ("git://{}/~{}/{}",)
    ]
    if "Repository seems to be empty" in r.text:
        clone_urls = clone_urls[:2]
    clone_text = "<tr><td colspan='3'>" +\
        "<a rel='vcs-git' href='__CLONE_URL__' title='~{}/{} Git repository'>__CLONE_URL__</a>".format(user, repo) +\
        "</td></tr>"