diff options
author | Andrey Nering <andrey.nering@gmail.com> | 2017-06-12 11:05:01 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-12 11:05:01 -0300 |
commit | 635273cea68400a718806bb1603c5f62a4e66e04 (patch) | |
tree | 952058975350f61350dcd098d48ee77592500039 /models | |
parent | b5d2780b22c8261e7b9e838df6f24d983b884825 (diff) | |
parent | c85ff532e9154920fc2bc3f6753a805615b924dc (diff) | |
download | gitea-635273cea68400a718806bb1603c5f62a4e66e04.tar.gz gitea-635273cea68400a718806bb1603c5f62a4e66e04.zip |
Merge pull request #1829 from ethantkoenig/no_branches
Commitless repos should be bare
Diffstat (limited to 'models')
-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 fa610ff5cd..275914b32b 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) } |