1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

Merge pull request #1829 from ethantkoenig/no_branches

Commitless repos should be bare
This commit is contained in:
Andrey Nering
2017-06-12 11:05:01 -03:00
committed by GitHub
2 changed files with 5 additions and 1 deletions

View File

@@ -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)
}