Skip to content

Commit 421f66e

Browse files
committed
fix: use reverseCheckoutOrder in forcePush
Signed-off-by: Kipras Melnikovas <kipras@kipras.org>
1 parent b0c75ee commit 421f66e

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

apply.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ export const apply: BranchSequencerBase = (args) =>
2525
// callbackAfterDone: defaultApplyCallback,
2626
delayMsBetweenCheckouts: 0,
2727
behaviorOfGetBranchBoundaries: BehaviorOfGetBranchBoundaries["parse-from-not-yet-applied-state"],
28+
reverseCheckoutOrder: false,
2829
}).then(
2930
(ret) => (markThatApplied(args.pathToStackedRebaseDirInsideDotGit), ret) //
3031
);

forcePush.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,4 +121,16 @@ export const forcePush: BranchSequencerBase = (argsBase) =>
121121
*/
122122
behaviorOfGetBranchBoundaries:
123123
BehaviorOfGetBranchBoundaries["ignore-unapplied-state-and-use-simple-branch-traversal"],
124+
125+
/**
126+
* (experimental)
127+
*
128+
* github just closed (emptily merged) one of the PRs
129+
* because some commit was now already part of some other branch.
130+
*
131+
* pretty sure that pushing newest branches first, and oldest later,
132+
* instead of the current "oldest first, then newest",
133+
* would solve this.
134+
*/
135+
reverseCheckoutOrder: true,
124136
});

git-stacked-rebase.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,7 @@ export const gitStackedRebase = async (
299299
BehaviorOfGetBranchBoundaries[
300300
"if-stacked-rebase-in-progress-then-parse-not-applied-state-otherwise-simple-branch-traverse"
301301
],
302+
reverseCheckoutOrder: false,
302303
});
303304
} else {
304305
/**

0 commit comments

Comments
 (0)