Fix forking an empty repository (#6637)

Fixes #6633

Signed-off-by: Segev Finer <segev@codeocean.com>
This commit is contained in:
Segev Finer 2019-04-15 23:48:35 +03:00 committed by techknowlogick
parent 3fb038c53a
commit ecfa5f1594
2 changed files with 8 additions and 7 deletions

View file

@ -2436,6 +2436,7 @@ func ForkRepository(doer, u *User, oldRepo *Repository, name, desc string) (_ *R
Description: desc,
DefaultBranch: oldRepo.DefaultBranch,
IsPrivate: oldRepo.IsPrivate,
IsEmpty: oldRepo.IsEmpty,
IsFork: true,
ForkID: oldRepo.ID,
}