|
|
@@ -197,13 +197,14 @@ type Repository struct { |
|
|
|
ExternalMetas map[string]string `xorm:"-"` |
|
|
|
Units []*RepoUnit `xorm:"-"` |
|
|
|
|
|
|
|
IsFork bool `xorm:"INDEX NOT NULL DEFAULT false"` |
|
|
|
ForkID int64 `xorm:"INDEX"` |
|
|
|
BaseRepo *Repository `xorm:"-"` |
|
|
|
Size int64 `xorm:"NOT NULL DEFAULT 0"` |
|
|
|
IndexerStatus *RepoIndexerStatus `xorm:"-"` |
|
|
|
IsFsckEnabled bool `xorm:"NOT NULL DEFAULT true"` |
|
|
|
Topics []string `xorm:"TEXT JSON"` |
|
|
|
IsFork bool `xorm:"INDEX NOT NULL DEFAULT false"` |
|
|
|
ForkID int64 `xorm:"INDEX"` |
|
|
|
BaseRepo *Repository `xorm:"-"` |
|
|
|
Size int64 `xorm:"NOT NULL DEFAULT 0"` |
|
|
|
IndexerStatus *RepoIndexerStatus `xorm:"-"` |
|
|
|
IsFsckEnabled bool `xorm:"NOT NULL DEFAULT true"` |
|
|
|
CloseIssuesViaCommitInAnyBranch bool `xorm:"NOT NULL DEFAULT false"` |
|
|
|
Topics []string `xorm:"TEXT JSON"` |
|
|
|
|
|
|
|
CreatedUnix util.TimeStamp `xorm:"INDEX created"` |
|
|
|
UpdatedUnix util.TimeStamp `xorm:"INDEX updated"` |
|
|
@@ -1373,13 +1374,14 @@ func CreateRepository(doer, u *User, opts CreateRepoOptions) (_ *Repository, err |
|
|
|
} |
|
|
|
|
|
|
|
repo := &Repository{ |
|
|
|
OwnerID: u.ID, |
|
|
|
Owner: u, |
|
|
|
Name: opts.Name, |
|
|
|
LowerName: strings.ToLower(opts.Name), |
|
|
|
Description: opts.Description, |
|
|
|
IsPrivate: opts.IsPrivate, |
|
|
|
IsFsckEnabled: !opts.IsMirror, |
|
|
|
OwnerID: u.ID, |
|
|
|
Owner: u, |
|
|
|
Name: opts.Name, |
|
|
|
LowerName: strings.ToLower(opts.Name), |
|
|
|
Description: opts.Description, |
|
|
|
IsPrivate: opts.IsPrivate, |
|
|
|
IsFsckEnabled: !opts.IsMirror, |
|
|
|
CloseIssuesViaCommitInAnyBranch: setting.Repository.DefaultCloseIssuesViaCommitsInAnyBranch, |
|
|
|
} |
|
|
|
|
|
|
|
sess := x.NewSession() |
|
|
|