@@ -109,9 +109,9 @@ func (tes Entries) Sort() {
109109}
110110
111111type commitInfo struct {
112- id string
113- infos []interface {}
114- err error
112+ entryName string
113+ infos []interface {}
114+ err error
115115}
116116
117117// GetCommitsInfo takes advantages of concurrey to speed up getting information
@@ -128,7 +128,7 @@ func (tes Entries) GetCommitsInfo(commit *Commit, treePath string) ([][]interfac
128128 for i := range tes {
129129 if tes [i ].Type != OBJECT_COMMIT {
130130 go func (i int ) {
131- cinfo := commitInfo {id : tes [i ].ID . String ()}
131+ cinfo := commitInfo {entryName : tes [i ].Name ()}
132132 c , err := commit .GetCommitByPath (filepath .Join (treePath , tes [i ].Name ()))
133133 if err != nil {
134134 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
142142
143143 // Handle submodule
144144 go func (i int ) {
145- cinfo := commitInfo {id : tes [i ].ID . String ()}
145+ cinfo := commitInfo {entryName : tes [i ].Name ()}
146146 sm , err := commit .GetSubModule (path .Join (treePath , tes [i ].Name ()))
147147 if err != nil {
148148 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
171171 return nil , info .err
172172 }
173173
174- infoMap [info .id ] = info .infos
174+ infoMap [info .entryName ] = info .infos
175175 i ++
176176 if i == len (tes ) {
177177 break
@@ -180,7 +180,7 @@ func (tes Entries) GetCommitsInfo(commit *Commit, treePath string) ([][]interfac
180180
181181 commitsInfo := make ([][]interface {}, len (tes ))
182182 for i := 0 ; i < len (tes ); i ++ {
183- commitsInfo [i ] = infoMap [tes [i ].ID . String ()]
183+ commitsInfo [i ] = infoMap [tes [i ].Name ()]
184184 }
185185 return commitsInfo , nil
186186}
0 commit comments