From 680c2081f10ad06e7bbde67b22c38b9e4fbe7dd9 Mon Sep 17 00:00:00 2001 From: Kipras Melnikovas Date: Sun, 8 May 2022 11:08:09 +0300 Subject: [PATCH] fix: checkout branches 1 at a time, not multiple concatenated implicitly w/ `,` from .toString Signed-off-by: Kipras Melnikovas --- branchSequencer.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/branchSequencer.ts b/branchSequencer.ts index 00cd3c1b..517a0e42 100644 --- a/branchSequencer.ts +++ b/branchSequencer.ts @@ -383,22 +383,22 @@ export const branchSequencer: BranchSequencer = async ({ ? boundaries.length === originalBoundariesLength : boundaries.length === 1; - /** - * https://libgit2.org/libgit2/#HEAD/group/checkout/git_checkout_head - */ - // await Git.Checkout.tree(repo, targetBranch as any); // TODO TS FIXME - execSyncInRepo(`${gitCmd} checkout ${targetBranch}`); // f this - await sequentialResolve( - targetBranch.map((x) => async () => + targetBranch.map((x) => async () => { + /** + * https://libgit2.org/libgit2/#HEAD/group/checkout/git_checkout_head + */ + // await Git.Checkout.tree(repo, targetBranch as any); // TODO TS FIXME + execSyncInRepo(`${gitCmd} checkout ${x}`); // f this + await actionInsideEachCheckedOutBranch({ repo, // targetBranch: x, targetCommitSHA, isLatestBranch, execSyncInRepo, - }) - ) + }); + }) ); return goNext();