Skip to content

Commit a8c1339

Browse files
committed
fix: replace remaining raw git commands with gitCmd
Signed-off-by: Kipras Melnikovas <kipras@kipras.org>
1 parent 039b984 commit a8c1339

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

branchSequencer.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ export const branchSequencer: BranchSequencer = async ({
7171
actionInsideEachCheckedOutBranch,
7272
callbackAfterDone = (): void => {},
7373
rewrittenListFile = filenames.rewrittenList,
74+
gitCmd,
7475
}) => {
7576
if (!fs.existsSync(pathToStackedRebaseDirInsideDotGit)) {
7677
throw new Termination(`\n\nno stacked-rebase in progress? (nothing to ${rootLevelCommandName})\n\n`);
@@ -157,8 +158,11 @@ export const branchSequencer: BranchSequencer = async ({
157158
*/
158159
const isFinalCheckout: boolean = cmds.length === 1;
159160

161+
/**
162+
* https://libgit2.org/libgit2/#HEAD/group/checkout/git_checkout_head
163+
*/
160164
// await Git.Checkout.tree(repo, targetBranch as any); // TODO TS FIXME
161-
execSyncInRepo(`git checkout ${targetBranch}`); // f this
165+
execSyncInRepo(`${gitCmd} checkout ${targetBranch}`); // f this
162166

163167
await actionInsideEachCheckedOutBranch({
164168
repo, //

0 commit comments

Comments
 (0)