From 05cce24a7913e2227709ed8530a65798b6934889 Mon Sep 17 00:00:00 2001
From: Luka Hietala
Date: Tue, 25 Nov 2025 22:04:29 +0200
Subject: [PATCH] add repo description
---
git/repo.py | 10 +++++++++-
templates/index.html | 13 ++++++++++---
2 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/git/repo.py b/git/repo.py
index 3fe2e7a..0568a81 100644
--- a/git/repo.py
+++ b/git/repo.py
@@ -12,9 +12,17 @@ def get_bare_repos(path):
try:
repo = git.Repository(str(item))
if repo.is_bare:
+ description = ""
+ desc_file = item / "description"
+ if desc_file.exists():
+ try:
+ description = desc_file.read_text().strip()
+ except:
+ pass
repo_info = {
"name": item.name,
- "path": str(item.resolve())
+ "path": str(item.resolve()),
+ "description": description
}
repos.append(repo_info)
except git.GitError:
diff --git a/templates/index.html b/templates/index.html
index 83b9be9..9e8c59a 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -21,11 +21,18 @@
A git interface for repositories. In development. Currently supports basic git pluming features, and views commits, trees, blobs, diffs and refs. Feautres like stats, commit signature verification, grep, submodules, auth, sql db integration are planned.
Repositories
-