@@ -3,8 +3,6 @@ import assert from "assert";
33
44import Git from "nodegit" ;
55
6- import { filenames } from "./filenames" ;
7-
86import { createExecSyncInRepo } from "./util/execSyncInRepo" ;
97import { Termination } from "./util/error" ;
108
@@ -54,7 +52,6 @@ export type BranchSequencerArgs = BranchSequencerArgsBase & {
5452 actionInsideEachCheckedOutBranch : ActionInsideEachCheckedOutBranch ;
5553 delayMsBetweenCheckouts ?: number ;
5654 callbackAfterDone ?: CallbackAfterDone ;
57- rewrittenListFile ?: typeof filenames . rewrittenList ;
5855} ;
5956
6057export type BranchSequencerBase = ( args : BranchSequencerArgsBase ) => Promise < void > ;
@@ -70,17 +67,13 @@ export const branchSequencer: BranchSequencer = async ({
7067 // callbackBeforeBegin,
7168 actionInsideEachCheckedOutBranch,
7269 callbackAfterDone = ( ) : void => { } ,
73- rewrittenListFile = filenames . rewrittenList ,
70+ gitCmd ,
7471} ) => {
7572 if ( ! fs . existsSync ( pathToStackedRebaseDirInsideDotGit ) ) {
7673 throw new Termination ( `\n\nno stacked-rebase in progress? (nothing to ${ rootLevelCommandName } )\n\n` ) ;
7774 }
7875
79- const stackedRebaseCommandsNew : GoodCommand [ ] = parseNewGoodCommands (
80- repo ,
81- pathToStackedRebaseTodoFile ,
82- rewrittenListFile
83- ) ;
76+ const stackedRebaseCommandsNew : GoodCommand [ ] = parseNewGoodCommands ( repo , pathToStackedRebaseTodoFile ) ;
8477
8578 // const remotes: Git.Remote[] = await repo.getRemotes();
8679 // const remote: Git.Remote | undefined = remotes.find((r) =>
@@ -157,8 +150,11 @@ export const branchSequencer: BranchSequencer = async ({
157150 */
158151 const isFinalCheckout : boolean = cmds . length === 1 ;
159152
153+ /**
154+ * https://libgit2.org/libgit2/#HEAD/group/checkout/git_checkout_head
155+ */
160156 // await Git.Checkout.tree(repo, targetBranch as any); // TODO TS FIXME
161- execSyncInRepo ( `git checkout ${ targetBranch } ` ) ; // f this
157+ execSyncInRepo ( `${ gitCmd } checkout ${ targetBranch } ` ) ; // f this
162158
163159 await actionInsideEachCheckedOutBranch ( {
164160 repo, //
0 commit comments