aboutsummaryrefslogtreecommitdiffstats
path: root/templates/repo
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2022-01-01 17:05:31 +0800
committerGitHub <noreply@github.com>2022-01-01 17:05:31 +0800
commit385dc6a9927bd4bb66cb2a62e3f7e5643b973ee9 (patch)
tree287d120cd7125e59b8fa2cd6fd82a399f3189901 /templates/repo
parent25a290e320de630eaf8ef4e56bb435c1ecfe1032 (diff)
downloadgitea-385dc6a9927bd4bb66cb2a62e3f7e5643b973ee9.tar.gz
gitea-385dc6a9927bd4bb66cb2a62e3f7e5643b973ee9.zip
Allow admin to associate missing LFS objects for repositories (#18143)
This PR reworked the Find pointer files feature in Settings -> LFS page. When a LFS object is missing from database but exists in LFS content store, admin can associate it to the repository by clicking the Associate button. This PR is not perfect (because the LFS module itself should be improved too), it's just a nice-to-have feature to help users recover their LFS repositories (eg: database was lost / table was truncated)
Diffstat (limited to 'templates/repo')
-rw-r--r--templates/repo/settings/lfs_pointers.tmpl2
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/repo/settings/lfs_pointers.tmpl b/templates/repo/settings/lfs_pointers.tmpl
index bf23062ae3..440e544232 100644
--- a/templates/repo/settings/lfs_pointers.tmpl
+++ b/templates/repo/settings/lfs_pointers.tmpl
@@ -11,7 +11,7 @@
<form class="ui form" method="post" action="{{$.Link}}/associate">
{{.CsrfTokenHtml}}
{{range .Pointers}}
- {{if and (not .InRepo) .Exists .Accessible}}
+ {{if .Associatable}}
<input type="hidden" name="oid" value="{{.Oid}} {{.Size}}"/>
{{end}}
{{end}}