summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/middleware/repo.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/middleware/repo.go b/modules/middleware/repo.go
index 16bd7defb8..e1c5c68c75 100644
--- a/modules/middleware/repo.go
+++ b/modules/middleware/repo.go
@@ -253,7 +253,10 @@ func RepoAssignment(redirect bool, args ...bool) macaron.Handler {
}
if ctx.IsSigned {
- ctx.Repo.IsWatching = models.IsWatching(ctx.User.Id, repo.Id)
+ ctx.Data["IsWatchingRepo"] = models.IsWatching(ctx.User.Id, repo.Id)
+ }
+ if ctx.Repo.Repository.IsBare {
+ return
}
ctx.Data["TagName"] = ctx.Repo.TagName
@@ -276,7 +279,6 @@ func RepoAssignment(redirect bool, args ...bool) macaron.Handler {
ctx.Data["BranchName"] = ctx.Repo.BranchName
ctx.Data["CommitId"] = ctx.Repo.CommitId
- ctx.Data["IsWatchingRepo"] = ctx.Repo.IsWatching
}
}