From 13801aac9ec8502b2df3160d61fe5d897891d793 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Wed, 12 Feb 2025 00:50:23 +0800 Subject: repo_commit: Use /dev/null, not {a,b}/NULL, for empty files --- handle_repo_commit.go | 2 +- templates/repo_commit.html.tmpl | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/handle_repo_commit.go b/handle_repo_commit.go index af04d69..0570056 100644 --- a/handle_repo_commit.go +++ b/handle_repo_commit.go @@ -127,5 +127,5 @@ func (f fake_diff_file) Path() string { var fake_diff_file_null = fake_diff_file{ hash: plumbing.NewHash("e69de29bb2d1d6434b8b29ae775ad8c2e48c5391"), mode: misc.First_or_panic(filemode.New("100644")), - path: "NULL", + path: "", } diff --git a/templates/repo_commit.html.tmpl b/templates/repo_commit.html.tmpl index a09f7f2..f219d2e 100644 --- a/templates/repo_commit.html.tmpl +++ b/templates/repo_commit.html.tmpl @@ -56,9 +56,17 @@
-- cgit v1.2.3