diff --git a/models/repo.go b/models/repo.go index 65cd36864064..7abb793e5f0d 100644 --- a/models/repo.go +++ b/models/repo.go @@ -1377,5 +1377,9 @@ func ForkRepository(u *User, oldRepo *Repository, name, desc string) (_ *Reposit return nil, fmt.Errorf("git update-server-info: %v", err) } + if err = createUpdateHook(repoPath); err != nil { + return nil, fmt.Errorf("createUpdateHook: %v", err) + } + return repo, sess.Commit() }