aboutsummaryrefslogtreecommitdiffstats
path: root/models/update.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/update.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/update.go')
-rw-r--r--models/update.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/models/update.go b/models/update.go
index 3cb0608594..b3a8a1c9fb 100644
--- a/models/update.go
+++ b/models/update.go
@@ -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{