We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 642e8c1 commit 06ff9b6Copy full SHA for 06ff9b6
services/context/repo.go
@@ -795,6 +795,9 @@ func RepoRefByType(detectRefType git.RefType) func(*Context) {
795
return func(ctx *Context) {
796
var err error
797
refType := detectRefType
798
+ if ctx.Repo.Repository.IsBeingCreated() {
799
+ return // no git repo, so do nothing, users will see a "migrating" UI provided by "migrate/migrating.tmpl"
800
+ }
801
// Empty repository does not have reference information.
802
if ctx.Repo.Repository.IsEmpty {
803
// assume the user is viewing the (non-existent) default branch
0 commit comments