1
0
mirror of https://github.com/go-gitea/git.git synced 2026-02-05 06:45:03 +01:00

Fix regression causing no submodule info

This fixes regression introduced in ebd9fb2253,
that GetSubModules was always returning empty submodule info because
c.submoduleCache != nil check was always true since parseCommitData was setting
commit.submoduleCache = newObjectCache() so it was always not-nil.

Now we initialize submoduleCache in first GetSubModules call, next call will
return cached entries.
This commit is contained in:
Adam Strzelecki
2016-01-13 18:48:32 +01:00
parent 081966e117
commit d78e7eee65
2 changed files with 1 additions and 1 deletions

View File

@@ -195,6 +195,7 @@ func (c *Commit) GetSubModules() (*objectCache, error) {
}
scanner := bufio.NewScanner(rd)
c.submoduleCache = newObjectCache()
var ismodule bool
var path string
for scanner.Scan() {