@@ -109,9 +109,9 @@ func (tes Entries) Sort() {
109
109
}
110
110
111
111
type commitInfo struct {
112
- id string
113
- infos []interface {}
114
- err error
112
+ entryName string
113
+ infos []interface {}
114
+ err error
115
115
}
116
116
117
117
// GetCommitsInfo takes advantages of concurrey to speed up getting information
@@ -128,7 +128,7 @@ func (tes Entries) GetCommitsInfo(commit *Commit, treePath string) ([][]interfac
128
128
for i := range tes {
129
129
if tes [i ].Type != OBJECT_COMMIT {
130
130
go func (i int ) {
131
- cinfo := commitInfo {id : tes [i ].ID . String ()}
131
+ cinfo := commitInfo {entryName : tes [i ].Name ()}
132
132
c , err := commit .GetCommitByPath (filepath .Join (treePath , tes [i ].Name ()))
133
133
if err != nil {
134
134
cinfo .err = fmt .Errorf ("GetCommitByPath (%s/%s): %v" , treePath , tes [i ].Name (), err )
@@ -142,7 +142,7 @@ func (tes Entries) GetCommitsInfo(commit *Commit, treePath string) ([][]interfac
142
142
143
143
// Handle submodule
144
144
go func (i int ) {
145
- cinfo := commitInfo {id : tes [i ].ID . String ()}
145
+ cinfo := commitInfo {entryName : tes [i ].Name ()}
146
146
sm , err := commit .GetSubModule (path .Join (treePath , tes [i ].Name ()))
147
147
if err != nil {
148
148
cinfo .err = fmt .Errorf ("GetSubModule (%s/%s): %v" , treePath , tes [i ].Name (), err )
@@ -171,7 +171,7 @@ func (tes Entries) GetCommitsInfo(commit *Commit, treePath string) ([][]interfac
171
171
return nil , info .err
172
172
}
173
173
174
- infoMap [info .id ] = info .infos
174
+ infoMap [info .entryName ] = info .infos
175
175
i ++
176
176
if i == len (tes ) {
177
177
break
@@ -180,7 +180,7 @@ func (tes Entries) GetCommitsInfo(commit *Commit, treePath string) ([][]interfac
180
180
181
181
commitsInfo := make ([][]interface {}, len (tes ))
182
182
for i := 0 ; i < len (tes ); i ++ {
183
- commitsInfo [i ] = infoMap [tes [i ].ID . String ()]
183
+ commitsInfo [i ] = infoMap [tes [i ].Name ()]
184
184
}
185
185
return commitsInfo , nil
186
186
}
0 commit comments