aboutsummaryrefslogtreecommitdiffstats
path: root/templates/repo/blame.tmpl
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2024-06-13 09:06:46 +0800
committerGitHub <noreply@github.com>2024-06-13 01:06:46 +0000
commit47ca61d8ba41f363745f6d0f93cb8efafa92564b (patch)
tree53d5325e00d626144fa119c7b8a48b498bf347a3 /templates/repo/blame.tmpl
parent7115dce773e3021b3538ae360c4e7344d5bbf45b (diff)
downloadgitea-47ca61d8ba41f363745f6d0f93cb8efafa92564b.tar.gz
gitea-47ca61d8ba41f363745f6d0f93cb8efafa92564b.zip
Improve detecting empty files (#31332)
Co-authored-by: silverwind <me@silverwind.io>
Diffstat (limited to 'templates/repo/blame.tmpl')
-rw-r--r--templates/repo/blame.tmpl2
1 files changed, 2 insertions, 0 deletions
diff --git a/templates/repo/blame.tmpl b/templates/repo/blame.tmpl
index 4ad3ed85c9..3e7cd92066 100644
--- a/templates/repo/blame.tmpl
+++ b/templates/repo/blame.tmpl
@@ -32,6 +32,8 @@
<div class="file-view code-view unicode-escaped">
{{if .IsFileTooLarge}}
{{template "shared/filetoolarge" dict "RawFileLink" .RawFileLink}}
+ {{else if not .FileSize}}
+ {{template "shared/fileisempty"}}
{{else}}
<table>
<tbody>