diff options
author | Unknwon <joe2010xtmf@163.com> | 2015-02-02 23:42:53 -0500 |
---|---|---|
committer | Unknwon <joe2010xtmf@163.com> | 2015-02-02 23:42:53 -0500 |
commit | 4de0b19cece439dceb285c56dde1e5ce2f67b098 (patch) | |
tree | 0d051b7a11b59792f6c248d55977aa2906d34210 | |
parent | 902f19f70b86888718e8755354a2d3bf6215838e (diff) | |
download | gitea-4de0b19cece439dceb285c56dde1e5ce2f67b098.tar.gz gitea-4de0b19cece439dceb285c56dde1e5ce2f67b098.zip |
models: mirro code fix for #821
-rw-r--r-- | models/repo.go | 4 |
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 |