Skip to content

Commit 6a50bc3

Browse files
committed
Fixes cherry pick commit ordering
- Falls back to author date if committed date matches
1 parent e3b76ad commit 6a50bc3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/env/node/git/sub-providers/commits.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,9 @@ export class CommitsGitSubProvider implements GitCommitsSubProvider {
100100
'--',
101101
);
102102
const commits = [...parser.parse(result.stdout)].sort(
103-
(c1, c2) => Number(c1.committerDate) - Number(c2.committerDate),
103+
(c1, c2) =>
104+
Number(c1.committerDate) - Number(c2.committerDate) ||
105+
Number(c1.authorDate) - Number(c2.authorDate),
104106
);
105107
revs = commits.map(c => c.sha);
106108
}

0 commit comments

Comments
 (0)