mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-05 14:37:41 +02:00
Repo size in admin panel (#1482)
* Implementation of the feature to view repository size in admin panel * Move GetRepoSize to git module * Repository.RepoSize -> Repository.Size * RepoSize -> Size in template * Redo a few bits and pieces * Update size when syncing mirror or forking * Remove GetRepoSize * Changed fatal errors to error message * Copy migration code from Gogs * make fmt
This commit is contained in:
1 parent
54f0293f0a
commit
be6edaddcb
8 files changed
+119
No files matched your search
@@ -101,6 +101,10 @@ func PushUpdate(opts PushUpdateOptions) (err error) {
|
||||
return fmt.Errorf("GetRepositoryByName: %v", err)
|
||||
}
|
||||
|
||||
if err = repo.UpdateSize(); err != nil {
|
||||
log.Error(4, "Failed to update size for repository: %v", err)
|
||||
}
|
||||
|
||||
// Push tags.
|
||||
if strings.HasPrefix(opts.RefFullName, git.TagPrefix) {
|
||||
if err := CommitRepoAction(CommitRepoActionOptions{
|
||||
|
||||
Reference in new issue
Block a user