Skip to content

Commit 9f46981

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 <[email protected]>
1 parent 7e836bc commit 9f46981

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
@@ -467,11 +467,7 @@ export const gitStackedRebase = async (
467467

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

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

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

0 commit comments

Comments
 (0)