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
222222 return nil , err
223223 }
224224
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 (s , sha ) {
229+ return c
230+ }
231+ }
232+ return nil
233+ },
234+ func (sha string ) * models.Commit {
235+ return fullCommits [sha ]
236+ })
237+
225238 hydratedCommits := make ([]* models.Commit , 0 , len (commits ))
226239 for _ , rebasingCommit := range commits {
227240 if rebasingCommit .Sha == "" {
228241 hydratedCommits = append (hydratedCommits , rebasingCommit )
229- } else if commit := fullCommits [ rebasingCommit .Sha ] ; commit != nil {
242+ } else if commit := findFullCommit ( rebasingCommit .Sha ) ; commit != nil {
230243 commit .Action = rebasingCommit .Action
231244 commit .Status = rebasingCommit .Status
232245 hydratedCommits = append (hydratedCommits , commit )
You can’t perform that action at this time.
0 commit comments