File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -414,8 +414,8 @@ func RepoAssignment() macaron.Handler {
414
414
}
415
415
}
416
416
417
- // repo is empty and display enable
418
- if ctx .Repo .Repository .IsEmpty || ctx . Repo . Repository . IsBeingCreated () {
417
+ // Disable everything when the repo is being created
418
+ if ctx .Repo .Repository .IsBeingCreated () {
419
419
ctx .Data ["BranchName" ] = ctx .Repo .Repository .DefaultBranch
420
420
return
421
421
}
@@ -427,6 +427,12 @@ func RepoAssignment() macaron.Handler {
427
427
}
428
428
ctx .Repo .GitRepo = gitRepo
429
429
430
+ // Stop at this point when the repo is empty.
431
+ if ctx .Repo .Repository .IsEmpty {
432
+ ctx .Data ["BranchName" ] = ctx .Repo .Repository .DefaultBranch
433
+ return
434
+ }
435
+
430
436
tags , err := ctx .Repo .GitRepo .GetTags ()
431
437
if err != nil {
432
438
ctx .ServerError ("GetTags" , err )
You can’t perform that action at this time.
0 commit comments