Skip to content

Commit 7a5ce01

Browse files
committed
un-parallelize executing commands of "stacked" rebase
while creating branches might be okay in parallel, we'll soon rely on the order for some things, so would be more dangerous Signed-off-by: Kipras Melnikovas <kipras@kipras.org>
1 parent 6a124f5 commit 7a5ce01

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

git-stacked-rebase.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -466,11 +466,7 @@ export const gitStackedRebase = async (
466466

467467
const goodCommands: GoodCommand[] = parseTodoOfStackedRebase(pathToStackedRebaseTodoFile);
468468

469-
const proms: Promise<void>[] = goodCommands.map(async (cmd) => {
470-
// if (cmd.commandName === "pick") {
471-
472-
// }
473-
469+
for (const cmd of goodCommands) {
474470
if (cmd.rebaseKind === "regular") {
475471
regularRebaseTodoLines.push(cmd.fullLine);
476472
} else if (cmd.rebaseKind === "stacked") {
@@ -482,9 +478,7 @@ export const gitStackedRebase = async (
482478
await Git.Branch.create(repo, newBranchName, targetCommit, force);
483479
}
484480
}
485-
});
486-
487-
await Promise.all(proms);
481+
}
488482

489483
/**
490484
* libgit2's git rebase is sadly not very powerful

0 commit comments

Comments
 (0)