Skip to content

Commit 1de2a32

Browse files
committed
change commitInfo.entry to commitInfo.entryName
1 parent d18ad23 commit 1de2a32

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

tree_entry.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,10 @@ func (tes Entries) Sort() {
109109
}
110110

111111
type commitInfo struct {
112-
id string
113-
entry string
114-
infos []interface{}
115-
err error
112+
id string
113+
entryName string
114+
infos []interface{}
115+
err error
116116
}
117117

118118
// GetCommitsInfo takes advantages of concurrey to speed up getting information
@@ -129,7 +129,7 @@ func (tes Entries) GetCommitsInfo(commit *Commit, treePath string) ([][]interfac
129129
for i := range tes {
130130
if tes[i].Type != OBJECT_COMMIT {
131131
go func(i int) {
132-
cinfo := commitInfo{id: tes[i].ID.String(), entry: tes[i].Name()}
132+
cinfo := commitInfo{id: tes[i].ID.String(), entryName: tes[i].Name()}
133133
c, err := commit.GetCommitByPath(filepath.Join(treePath, tes[i].Name()))
134134
if err != nil {
135135
cinfo.err = fmt.Errorf("GetCommitByPath (%s/%s): %v", treePath, tes[i].Name(), err)
@@ -143,7 +143,7 @@ func (tes Entries) GetCommitsInfo(commit *Commit, treePath string) ([][]interfac
143143

144144
// Handle submodule
145145
go func(i int) {
146-
cinfo := commitInfo{id: tes[i].ID.String(), entry: tes[i].Name()}
146+
cinfo := commitInfo{id: tes[i].ID.String(), entryName: tes[i].Name()}
147147
sm, err := commit.GetSubModule(path.Join(treePath, tes[i].Name()))
148148
if err != nil {
149149
cinfo.err = fmt.Errorf("GetSubModule (%s/%s): %v", treePath, tes[i].Name(), err)
@@ -172,7 +172,7 @@ func (tes Entries) GetCommitsInfo(commit *Commit, treePath string) ([][]interfac
172172
return nil, info.err
173173
}
174174

175-
infoMap[info.entry] = info.infos
175+
infoMap[info.entryName] = info.infos
176176
i++
177177
if i == len(tes) {
178178
break

0 commit comments

Comments
 (0)