File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -289,8 +289,6 @@ export const gitStackedRebase = async (
289289
290290 const checkIsRegularRebaseStillInProgress = ( ) : boolean => fs . existsSync ( pathToRegularRebaseDirInsideDotGit ) ;
291291
292- fs . mkdirSync ( pathToStackedRebaseDirInsideDotGit , { recursive : true } ) ;
293-
294292 const initialBranch : Git . Reference | void = await Git . Branch . lookup (
295293 repo , //
296294 nameOfInitialBranch ,
@@ -414,6 +412,14 @@ export const gitStackedRebase = async (
414412 throw new Termination ( "regular rebase already in progress" ) ;
415413 }
416414
415+ /**
416+ * only create the dir now, when it's needed.
417+ * otherwise, other commands can incorrectly infer
418+ * that our own stacked rebase is in progress,
419+ * when it's not, up until now.
420+ */
421+ fs . mkdirSync ( pathToStackedRebaseDirInsideDotGit , { recursive : true } ) ;
422+
417423 await createInitialEditTodoOfGitStackedRebase (
418424 repo , //
419425 initialBranch ,
You can’t perform that action at this time.
0 commit comments