@@ -3,8 +3,6 @@ import assert from "assert";
3
3
4
4
import Git from "nodegit" ;
5
5
6
- import { filenames } from "./filenames" ;
7
-
8
6
import { createExecSyncInRepo } from "./util/execSyncInRepo" ;
9
7
import { Termination } from "./util/error" ;
10
8
@@ -54,7 +52,6 @@ export type BranchSequencerArgs = BranchSequencerArgsBase & {
54
52
actionInsideEachCheckedOutBranch : ActionInsideEachCheckedOutBranch ;
55
53
delayMsBetweenCheckouts ?: number ;
56
54
callbackAfterDone ?: CallbackAfterDone ;
57
- rewrittenListFile ?: typeof filenames . rewrittenList ;
58
55
} ;
59
56
60
57
export type BranchSequencerBase = ( args : BranchSequencerArgsBase ) => Promise < void > ;
@@ -70,17 +67,13 @@ export const branchSequencer: BranchSequencer = async ({
70
67
// callbackBeforeBegin,
71
68
actionInsideEachCheckedOutBranch,
72
69
callbackAfterDone = ( ) : void => { } ,
73
- rewrittenListFile = filenames . rewrittenList ,
70
+ gitCmd ,
74
71
} ) => {
75
72
if ( ! fs . existsSync ( pathToStackedRebaseDirInsideDotGit ) ) {
76
73
throw new Termination ( `\n\nno stacked-rebase in progress? (nothing to ${ rootLevelCommandName } )\n\n` ) ;
77
74
}
78
75
79
- const stackedRebaseCommandsNew : GoodCommand [ ] = parseNewGoodCommands (
80
- repo ,
81
- pathToStackedRebaseTodoFile ,
82
- rewrittenListFile
83
- ) ;
76
+ const stackedRebaseCommandsNew : GoodCommand [ ] = parseNewGoodCommands ( repo , pathToStackedRebaseTodoFile ) ;
84
77
85
78
// const remotes: Git.Remote[] = await repo.getRemotes();
86
79
// const remote: Git.Remote | undefined = remotes.find((r) =>
@@ -157,8 +150,11 @@ export const branchSequencer: BranchSequencer = async ({
157
150
*/
158
151
const isFinalCheckout : boolean = cmds . length === 1 ;
159
152
153
+ /**
154
+ * https://libgit2.org/libgit2/#HEAD/group/checkout/git_checkout_head
155
+ */
160
156
// 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
162
158
163
159
await actionInsideEachCheckedOutBranch ( {
164
160
repo, //
0 commit comments