Skip to content

Commit

Permalink
fix: reverse found commits for range
Browse files Browse the repository at this point in the history
The commits are looked up for a range using log, which will
automatically start with the latest commit first. However, when
cherry-picking we want to start with the oldest commit first so we can
build on top of the commits. Otherwise, we'd easily run into conflicts.
  • Loading branch information
korthout committed Dec 3, 2023
1 parent 56588fa commit 89cc862
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/git.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export class Git {
): Promise<string[]> {
const { exitCode, stdout } = await this.git(
"log",
['--pretty=format:"%H"', range],
['--pretty=format:"%H"', "--reverse", range],
pwd,
);
if (exitCode !== 0) {
Expand Down

0 comments on commit 89cc862

Please sign in to comment.