diff options
author | Ethan Koenig <ethantkoenig@gmail.com> | 2017-05-28 22:25:23 -0400 |
---|---|---|
committer | Ethan Koenig <ethantkoenig@gmail.com> | 2017-05-28 22:31:40 -0400 |
commit | c85ff532e9154920fc2bc3f6753a805615b924dc (patch) | |
tree | 66e724ba00bec5f714db404660ec8f791879bda2 /models/action.go | |
parent | e67ece26f0b97437200998b9b153b4c3a87a65aa (diff) | |
download | gitea-c85ff532e9154920fc2bc3f6753a805615b924dc.tar.gz gitea-c85ff532e9154920fc2bc3f6753a805615b924dc.zip |
Commitless repos should be bare
Diffstat (limited to 'models/action.go')
-rw-r--r-- | models/action.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/models/action.go b/models/action.go index a09e420660..6ca92cf93e 100644 --- a/models/action.go +++ b/models/action.go @@ -517,7 +517,7 @@ func CommitRepoAction(opts CommitRepoActionOptions) error { } // Change repository bare status and update last updated time. - repo.IsBare = false + repo.IsBare = repo.IsBare && opts.Commits.Len <= 0 if err = UpdateRepository(repo, false); err != nil { return fmt.Errorf("UpdateRepository: %v", err) } |