mirror of
https://github.com/go-gitea/gitea.git
synced 2025-06-21 05:28:00 +02:00
Need a field to specify if repository is bare
This commit is contained in:
@ -87,6 +87,7 @@ func CommitRepoAction(userId int64, userName string,
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
repo.IsBare = false
|
||||
repo.Updated = time.Now()
|
||||
if err = UpdateRepository(repo); err != nil {
|
||||
return err
|
||||
|
@ -83,10 +83,11 @@ type Repository struct {
|
||||
Name string `xorm:"index not null"`
|
||||
Description string
|
||||
Website string
|
||||
Private bool
|
||||
NumWatches int
|
||||
NumStars int
|
||||
NumForks int
|
||||
IsPrivate bool
|
||||
IsBare bool
|
||||
Created time.Time `xorm:"created"`
|
||||
Updated time.Time `xorm:"updated"`
|
||||
}
|
||||
@ -139,7 +140,8 @@ func CreateRepository(user *User, repoName, desc, repoLang, license string, priv
|
||||
Name: repoName,
|
||||
LowerName: strings.ToLower(repoName),
|
||||
Description: desc,
|
||||
Private: private,
|
||||
IsPrivate: private,
|
||||
IsBare: repoLang == "" && license == "" && !initReadme,
|
||||
}
|
||||
|
||||
repoPath := RepoPath(user.Name, repoName)
|
||||
|
Reference in New Issue
Block a user