Browse Source

Fix Submodule dection in subdir (#7275)

Include the directory in name when looking for matching Submodule from
.gitmodules file

Fixes #7262
tags/v1.9.0-rc1
mrsdizzie 5 years ago
parent
commit
a25b3d4c72
1 changed files with 7 additions and 1 deletions
  1. 7
    1
      modules/git/commit_info.go

+ 7
- 1
modules/git/commit_info.go View File

entryCommit := convertCommit(rev) entryCommit := convertCommit(rev)
if entry.IsSubModule() { if entry.IsSubModule() {
subModuleURL := "" subModuleURL := ""
if subModule, err := commit.GetSubModule(entry.Name()); err != nil {
var fullPath string
if len(treePath) > 0 {
fullPath = treePath + "/" + entry.Name()
} else {
fullPath = entry.Name()
}
if subModule, err := commit.GetSubModule(fullPath); err != nil {
return nil, nil, err return nil, nil, err
} else if subModule != nil { } else if subModule != nil {
subModuleURL = subModule.URL subModuleURL = subModule.URL

Loading…
Cancel
Save