1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

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)
This commit is contained in:
wxiaoguang
2022-01-01 17:05:31 +08:00
committed by GitHub
parent 25a290e320
commit 385dc6a992
3 changed files with 57 additions and 26 deletions

View File

@@ -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}}