From 2159ed2cc629ae30d6bb020f67e301dedf779dd4 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Tue, 11 Feb 2025 21:33:48 +0800 Subject: repo_commit: Properly format patchsets --- templates/repo_commit.html.tmpl | 37 ++++++++++++++++++++++++------------- 1 file changed, 24 insertions(+), 13 deletions(-) (limited to 'templates') diff --git a/templates/repo_commit.html.tmpl b/templates/repo_commit.html.tmpl index edc4bc3..5b6cb84 100644 --- a/templates/repo_commit.html.tmpl +++ b/templates/repo_commit.html.tmpl @@ -41,21 +41,32 @@ -
+
+ {{ $parent_commit_object := .parent_commit_object }} + {{ $commit_object := .commit_object }} {{ range .file_patches }} -
- {{ .From.Path }} {{ .From.Mode }} → {{ .To.Path }} {{ .To.Mode }} - {{ range .Chunks }} - {{ if eq .Type 0 }} -
{{ .Content }}
- {{ else if eq .Type 1 }} -
{{ .Content }}
- {{ else if eq .Type 2 }} -
{{ .Content }}
- {{ else }} -
{{ .Content }}
+
+ + +
+ {{ range .Chunks }} + {{ if eq .Type 0 }} +
{{ .Content }}
+ {{ else if eq .Type 1 }} +
{{ .Content }}
+ {{ else if eq .Type 2 }} +
{{ .Content }}
+ {{ else }} +
{{ .Content }}
+ {{ end }} {{ end }} - {{ end }} +
{{ end }}
-- cgit v1.2.3