aboutsummaryrefslogtreecommitdiff
path: root/routers/repo/setting.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2017-04-01 17:56:55 -0400
committerUnknwon <u@gogs.io>2017-04-01 17:56:55 -0400
commitab42671c6380d32e1f7e45332e1818c9b7fec024 (patch)
treeb2587dd41e2e2aa9450e8b01da725b76f7a2f21d /routers/repo/setting.go
parentb3ac33cbcfba182c037e1c8c393f7536e5b7445d (diff)
repo: handle git.ErrUnsupportedVersion error type
Diffstat (limited to 'routers/repo/setting.go')
-rw-r--r--routers/repo/setting.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/routers/repo/setting.go b/routers/repo/setting.go
index a586bc02..95cce36b 100644
--- a/routers/repo/setting.go
+++ b/routers/repo/setting.go
@@ -404,6 +404,10 @@ func UpdateDefaultBranch(ctx *context.Context) {
ctx.Handle(500, "SetDefaultBranch", err)
return
}
+
+ ctx.Flash.Warning(ctx.Tr("repo.settings.update_default_branch_unsupported"))
+ ctx.Redirect(ctx.Repo.RepoLink + "/settings/branches")
+ return
}
}