File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -850,6 +850,11 @@ func renderCode(ctx *context.Context) {
850
850
return
851
851
}
852
852
// the repo is not really empty, so we should update the modal in database
853
+ // such problem may be caused by:
854
+ // 1) an error occurs during pushing/receiving. 2) the user replaces an empty git repo manually
855
+ // and even more: the IsEmpty flag is deeply broken and should be removed with the UI changed to manage to cope with empty repos.
856
+ // it's possible for a repository to be non-empty by that flag but still 500
857
+ // because there are no branches - only tags -or the default branch is non-extant as it has been 0-pushed.
853
858
ctx .Repo .Repository .IsEmpty = false
854
859
if err = repo_model .UpdateRepositoryCols (ctx .Repo .Repository , "is_empty" ); err != nil {
855
860
ctx .ServerError ("UpdateRepositoryCols" , err )
You can’t perform that action at this time.
0 commit comments