update git module (#2037)

This commit is contained in:
Lauris BH 2017-06-23 03:06:43 +03:00 committed by Lunny Xiao
parent cc6b3f60c6
commit c259c436d7
3 changed files with 14 additions and 7 deletions

11
vendor/code.gitea.io/git/commit.go generated vendored
View file

@ -235,6 +235,9 @@ func (c *Commit) GetSubModules() (*ObjectCache, error) {
entry, err := c.GetTreeEntryByPath(".gitmodules")
if err != nil {
if _, ok := err.(ErrNotExist); ok {
return nil, nil
}
return nil, err
}
rd, err := entry.Blob().Data()
@ -273,9 +276,11 @@ func (c *Commit) GetSubModule(entryname string) (*SubModule, error) {
return nil, err
}
module, has := modules.Get(entryname)
if has {
return module.(*SubModule), nil
if modules != nil {
module, has := modules.Get(entryname)
if has {
return module.(*SubModule), nil
}
}
return nil, nil
}