|
|
|
@ -246,14 +246,17 @@ func CreateRepository(user *User, name, desc, lang, license string, private, mir |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
repo := &Repository{ |
|
|
|
|
OwnerId: user.Id, |
|
|
|
|
Name: name, |
|
|
|
|
LowerName: strings.ToLower(name), |
|
|
|
|
Description: desc, |
|
|
|
|
IsPrivate: private, |
|
|
|
|
IsBare: lang == "" && license == "" && !initReadme, |
|
|
|
|
DefaultBranch: "master", |
|
|
|
|
OwnerId: user.Id, |
|
|
|
|
Name: name, |
|
|
|
|
LowerName: strings.ToLower(name), |
|
|
|
|
Description: desc, |
|
|
|
|
IsPrivate: private, |
|
|
|
|
IsBare: lang == "" && license == "" && !initReadme, |
|
|
|
|
} |
|
|
|
|
if !repo.IsBare { |
|
|
|
|
repo.DefaultBranch = "master" |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
repoPath := RepoPath(user.Name, repo.Name) |
|
|
|
|
|
|
|
|
|
sess := orm.NewSession() |
|
|
|
|