aboutsummaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
Diffstat (limited to 'models')
-rw-r--r--models/repo.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/models/repo.go b/models/repo.go
index 16b51c47ee..b745821753 100644
--- a/models/repo.go
+++ b/models/repo.go
@@ -504,9 +504,9 @@ func initRepository(f string, u *User, repo *Repository, initReadme bool, repoLa
}
if len(fileName) == 0 {
- // re-fetch the repository from database before updating it (else it would
+ // Re-fetch the repository from database before updating it (else it would
// override changes that were done earlier with sql)
- if _, err := x.Get(repo); err != nil {
+ if repo, err = GetRepositoryById(repo.Id); err != nil {
return err
}
repo.IsBare = true