summaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorUnknwon <joe2010xtmf@163.com>2014-09-25 22:42:31 -0400
committerUnknwon <joe2010xtmf@163.com>2014-09-25 22:42:31 -0400
commit10673417dcf5e27bb0a654dee3a2129f3fc2ebfc (patch)
tree16ec91a5dd2019c30667e387e8cee1d258d4b0fd /models
parentad52b2d79125e2f4ca7c535f27184fb385fca79c (diff)
downloadgitea-10673417dcf5e27bb0a654dee3a2129f3fc2ebfc.tar.gz
gitea-10673417dcf5e27bb0a654dee3a2129f3fc2ebfc.zip
Mirror fix on transfer repo
Diffstat (limited to 'models')
-rw-r--r--models/action.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/models/action.go b/models/action.go
index 3fb33f939a..9bd9da67c3 100644
--- a/models/action.go
+++ b/models/action.go
@@ -366,6 +366,13 @@ func TransferRepoAction(u, newUser *User, repo *Repository) (err error) {
return err
}
+ // Remove watch for organization.
+ if repo.Owner.IsOrganization() {
+ if err = WatchRepo(repo.Owner.Id, repo.Id, false); err != nil {
+ log.Error(4, "WatchRepo", err)
+ }
+ }
+
log.Trace("action.TransferRepoAction: %s/%s", u.Name, repo.Name)
return err
}