summaryrefslogtreecommitdiffstats
path: root/models/repo_mirror.go
diff options
context:
space:
mode:
authorJonas <cez81@users.noreply.github.com>2017-04-11 15:30:15 +0200
committerBo-Yi Wu <appleboy.tw@gmail.com>2017-04-11 21:30:15 +0800
commitbe6edaddcba1e607884539a250bd19debabba751 (patch)
tree352d09f7eb4643fb36bae9625fbeafd77643689e /models/repo_mirror.go
parent54f0293f0ab73f357f545f8e05d16f9b254aba5e (diff)
downloadgitea-be6edaddcba1e607884539a250bd19debabba751.tar.gz
gitea-be6edaddcba1e607884539a250bd19debabba751.zip
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
Diffstat (limited to 'models/repo_mirror.go')
-rw-r--r--models/repo_mirror.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/models/repo_mirror.go b/models/repo_mirror.go
index 67ae449bde..8a97879253 100644
--- a/models/repo_mirror.go
+++ b/models/repo_mirror.go
@@ -147,6 +147,11 @@ func (m *Mirror) runSync() bool {
}
return false
}
+
+ if err := m.Repo.UpdateSize(); err != nil {
+ log.Error(4, "Failed to update size for mirror repository: %v", err)
+ }
+
if m.Repo.HasWiki() {
if _, stderr, err := process.GetManager().ExecDir(
timeout, wikiPath, fmt.Sprintf("Mirror.runSync: %s", wikiPath),