|
|
@ -252,8 +252,11 @@ func CreateRepository(user *User, name, desc, lang, license string, private, mir |
|
|
|
Description: desc, |
|
|
|
Description: desc, |
|
|
|
IsPrivate: private, |
|
|
|
IsPrivate: private, |
|
|
|
IsBare: lang == "" && license == "" && !initReadme, |
|
|
|
IsBare: lang == "" && license == "" && !initReadme, |
|
|
|
DefaultBranch: "master", |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if !repo.IsBare { |
|
|
|
|
|
|
|
repo.DefaultBranch = "master" |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
repoPath := RepoPath(user.Name, repo.Name) |
|
|
|
repoPath := RepoPath(user.Name, repo.Name) |
|
|
|
|
|
|
|
|
|
|
|
sess := orm.NewSession() |
|
|
|
sess := orm.NewSession() |
|
|
|