Skip to content

Commit 7309fc0

Browse files
committed
fix: remove initial branch; do use the latest branch
Signed-off-by: Kipras Melnikovas <kipras@kipras.org>
1 parent bb12828 commit 7309fc0

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

branchSequencer.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,12 +272,19 @@ export const branchSequencer: BranchSequencer = async ({
272272
initialBranch,
273273
currentBranch,
274274
});
275+
276+
/**
277+
* remove the initial branch
278+
*/
279+
branchesAndCommits.shift();
280+
281+
const originalBoundariesLength: number = branchesAndCommits.length;
282+
275283
if (reverseCheckoutOrder) {
276284
branchesAndCommits.reverse();
277285
}
278-
const originalBoundariesLength: number = branchesAndCommits.length;
279286

280-
return checkout(branchesAndCommits.slice(1) as any); // TODO TS
287+
return checkout(branchesAndCommits);
281288

282289
async function checkout(boundaries: SimpleBranchAndCommit[]): Promise<void> {
283290
if (!boundaries.length) {

0 commit comments

Comments
 (0)