summaryrefslogtreecommitdiffstats
path: root/routers/private/serv.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/private/serv.go')
-rw-r--r--routers/private/serv.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/routers/private/serv.go b/routers/private/serv.go
index a7ef980d2d..329d80476a 100644
--- a/routers/private/serv.go
+++ b/routers/private/serv.go
@@ -162,6 +162,14 @@ func ServCommand(ctx *context.PrivateContext) {
return
}
+ if repo.IsBroken() {
+ ctx.JSON(http.StatusInternalServerError, private.ErrServCommand{
+ Results: results,
+ Err: "Repository is in a broken state",
+ })
+ return
+ }
+
// We can shortcut at this point if the repo is a mirror
if mode > models.AccessModeRead && repo.IsMirror {
ctx.JSON(http.StatusForbidden, private.ErrServCommand{