diff --git a/modules/setting/repository.go b/modules/setting/repository.go
index 0690415eb4..3bca41076f 100644
--- a/modules/setting/repository.go
+++ b/modules/setting/repository.go
@@ -10,6 +10,7 @@ import (
"strings"
"code.gitea.io/gitea/modules/log"
+
"github.com/dustin/go-humanize"
)
diff --git a/templates/repo/settings/options.tmpl b/templates/repo/settings/options.tmpl
index 2aaf0c3b4a..1f408d2e31 100644
--- a/templates/repo/settings/options.tmpl
+++ b/templates/repo/settings/options.tmpl
@@ -15,10 +15,10 @@
{{FileSize .Repository.Size}}
- {{if .ActualSizeLimit }}
- {{if .EnableSizeLimit }}
+ {{if .ActualSizeLimit}}
+ {{if .EnableSizeLimit}}
/{{FileSize .ActualSizeLimit}}
- {{end }}
+ {{end}}
{{end}}
diff --git a/tests/integration/git_test.go b/tests/integration/git_test.go
index f163d8e835..cdff57f21f 100644
--- a/tests/integration/git_test.go
+++ b/tests/integration/git_test.go
@@ -82,6 +82,7 @@ func testGit(t *testing.T, u *url.URL) {
mediaTest(t, &httpContext, little, big, littleLFS, bigLFS)
t.Run("SizeLimit", func(t *testing.T) {
+ setting.SaveGlobalRepositorySetting(true, 0)
t.Run("Under", func(t *testing.T) {
defer tests.PrintCurrentTest(t)()
doCommitAndPush(t, littleSize, dstPath, "data-file-")