Skip to content

Commit 138e9f1

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

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
@@ -408,6 +408,7 @@ export const gitStackedRebase = async (
408408
BehaviorOfGetBranchBoundaries[
409409
"if-stacked-rebase-in-progress-then-parse-not-applied-state-otherwise-simple-branch-traverse"
410410
],
411+
reverseCheckoutOrder: false,
411412
});
412413
} else {
413414
/**

0 commit comments

Comments
 (0)