From 7491c424a00f0824f1d45b33d3b3f55fb0a7c4d8 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Tue, 11 Feb 2025 20:50:17 +0800 Subject: repo_commit: Show chunks --- templates/repo_commit.html.tmpl | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'templates') diff --git a/templates/repo_commit.html.tmpl b/templates/repo_commit.html.tmpl index c480c92..edc4bc3 100644 --- a/templates/repo_commit.html.tmpl +++ b/templates/repo_commit.html.tmpl @@ -42,9 +42,22 @@
-
{{ .patch }}
-

-

+ {{ 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 }}
+ {{ end }} + {{ end }} +
+ {{ end }}