aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLauris BH <lauris@nix.lv>2019-01-29 03:42:47 +0200
committerLunny Xiao <xiaolunwen@gmail.com>2019-01-29 09:42:47 +0800
commit4fe1a3050ee0c5401d766ce5bac5ba068316c72f (patch)
treed15cb53f49d11d357dc94d9bde0e500127a2d01b
parent29799537a76fce9f2582b95ae3426f5f0c96eb44 (diff)
downloadgitea-4fe1a3050ee0c5401d766ce5bac5ba068316c72f.tar.gz
gitea-4fe1a3050ee0c5401d766ce5bac5ba068316c72f.zip
When creating new repository fsck option should be enabled (#5817) (#5885)
-rw-r--r--models/repo.go13
1 files changed, 7 insertions, 6 deletions
diff --git a/models/repo.go b/models/repo.go
index cd861d7500..e1e111a012 100644
--- a/models/repo.go
+++ b/models/repo.go
@@ -1359,12 +1359,13 @@ 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,
+ OwnerID: u.ID,
+ Owner: u,
+ Name: opts.Name,
+ LowerName: strings.ToLower(opts.Name),
+ Description: opts.Description,
+ IsPrivate: opts.IsPrivate,
+ IsFsckEnabled: true,
}
sess := x.NewSession()