File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
pkg/commands/git_commands Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -222,11 +222,24 @@ func (self *CommitLoader) getHydratedRebasingCommits(rebaseMode enums.RebaseMode
222
222
return nil , err
223
223
}
224
224
225
+ findFullCommit := lo .Ternary (self .version .IsOlderThan (2 , 25 , 2 ),
226
+ func (sha string ) * models.Commit {
227
+ for s , c := range fullCommits {
228
+ if strings .HasPrefix (sha , s ) {
229
+ return c
230
+ }
231
+ }
232
+ return nil
233
+ },
234
+ func (sha string ) * models.Commit {
235
+ return fullCommits [sha ]
236
+ })
237
+
225
238
hydratedCommits := make ([]* models.Commit , 0 , len (commits ))
226
239
for _ , rebasingCommit := range commits {
227
240
if rebasingCommit .Sha == "" {
228
241
hydratedCommits = append (hydratedCommits , rebasingCommit )
229
- } else if commit := fullCommits [ rebasingCommit .Sha ] ; commit != nil {
242
+ } else if commit := findFullCommit ( rebasingCommit .Sha ) ; commit != nil {
230
243
commit .Action = rebasingCommit .Action
231
244
commit .Status = rebasingCommit .Status
232
245
hydratedCommits = append (hydratedCommits , commit )
You can’t perform that action at this time.
0 commit comments