소스 검색

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 4 년 전
부모
커밋
a25b3d4c72
1개의 변경된 파일7개의 추가작업 그리고 1개의 파일을 삭제
  1. 7
    1
      modules/git/commit_info.go

+ 7
- 1
modules/git/commit_info.go 파일 보기

@@ -37,7 +37,13 @@ func (tes Entries) GetCommitsInfo(commit *Commit, treePath string, cache LastCom
entryCommit := convertCommit(rev)
if entry.IsSubModule() {
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
} else if subModule != nil {
subModuleURL = subModule.URL

Loading…
취소
저장