Fix forking an empty repository (#6637) (#6653)

Fixes #6633

Signed-off-by: Segev Finer <segev@codeocean.com>
This commit is contained in:
Segev Finer 2019-04-16 22:47:09 +03:00 committed by zeripath
parent 5876e37ed4
commit 5236d8a936
2 changed files with 8 additions and 7 deletions

View file

@ -2432,6 +2432,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,
}