From 2ded5fe7bc44af014a822e3718ac20a250bdbf51 Mon Sep 17 00:00:00 2001 From: Thorsten Ortlepp Date: Thu, 7 Nov 2024 23:15:40 +0100 Subject: Added main branch handling from upstream project --- views/summary.html | 32 ++++++++------------------------ 1 file changed, 8 insertions(+), 24 deletions(-) (limited to 'views/summary.html') diff --git a/views/summary.html b/views/summary.html index 905f2ee..2d926dc 100644 --- a/views/summary.html +++ b/views/summary.html @@ -35,38 +35,22 @@
% end -% if "master" in repo.branch_names(): +% if repo.main_branch():
- commits (master) + commits ({{repo.main_branch()}})
-% kwargs = dict(repo = repo, start_ref = "refs/heads/master", +% kwargs = dict(repo = repo, +% start_ref = "refs/heads/" + repo.main_branch(), % limit = repo.info.commits_in_summary, % shorten = shorten, repo_root = ".", offset = 0) % include('commit-list.html', **kwargs)
- tree (master) + tree ({{repo.main_branch()}})
-% kwargs = dict(repo = repo, tree=repo.tree("master"), -% treeroot="b/master/t", dirname=smstr.from_url("")) -% include('tree-list.html', **kwargs) -
-% end - -% if "main" in repo.branch_names(): -
- commits (main) -
-% kwargs = dict(repo = repo, start_ref = "refs/heads/main", -% limit = repo.info.commits_in_summary, -% shorten = shorten, repo_root = ".", offset = 0) -% include('commit-list.html', **kwargs) -
-
- tree (main) -
-% kwargs = dict(repo = repo, tree=repo.tree("main"), -% treeroot="b/main/t", dirname=smstr.from_url("")) +% kwargs = dict(repo = repo, tree=repo.tree(repo.main_branch()), +% treeroot="b/" + repo.main_branch() + "/t", +% dirname=smstr.from_url("")) % include('tree-list.html', **kwargs)
% end -- cgit v1.2.3