💾 Archived View for lists.flounder.online › patches › threads › 20210320204652.5797-2-johann@qwertqw… captured on 2022-04-28 at 19:24:50. Gemini links have been rewritten to link to archived content
-=-=-=-=-=-=-
From: johann@qwertqwefsday.eu
Date: Sat, 20 Mar 2021 21:46:50 +0100
Message-Id: 20210320204652.5797-2-johann@qwertqwefsday.eu
To: <~aw/patches@lists.sr.ht>
In-Reply-To: 20210320204652.5797-1-johann@qwertqwefsday.eu
Cc: "Johann150" <johann@qwertqwefsday.eu>
--------------------------------------
From: Johann150 <johann@qwertqwefsday.eu>
now that we can handle repos without readme correctly, this is no longer necessary
---
src/main.rs | 10 ----------
templates/repo-empty.html | 6 ------
2 files changed, 16 deletions(-)
delete mode 100644 templates/repo-empty.html
diff --git a/src/main.rs b/src/main.rs
index 21b620d..167ba95 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -128,12 +128,6 @@ struct RepoHomeTemplate {
readme_text: String,
}
-#[derive(Template)]
-#[template(path = "repo-empty.html")]
-struct RepoEmptyTemplate {
- repo: Repository,
-}
-
fn repo_from_request(repo_name: &str) -> Result<Repository> {
let repo_name = percent_encoding::percent_decode_str(repo_name)
.decode_utf8_lossy()
@@ -154,10 +148,6 @@ async fn repo_home(req: Request<()>) -> tide::Result {
}
let repo = repo_from_request(&req.param("repo_name")?)?;
- if repo.is_empty().unwrap() {
- // we would not be able to find HEAD
- return Ok(RepoEmptyTemplate { repo }.into());
- }
let mut format = ReadmeFormat::Plaintext;
let readme_text = repo
diff --git a/templates/repo-empty.html b/templates/repo-empty.html
deleted file mode 100644
index 70760c3..0000000
--- a/templates/repo-empty.html
+++ /dev/null
@@ -1,6 +0,0 @@
-{% extends "base.html" %}
-
-{% block content %}
- {% include "repo-navbar.html" %}
- <em>(This repository is empty.)</em>
-{% endblock %}
--
2.20.1