diff --git a/git-stacked-rebase.ts b/git-stacked-rebase.ts index 9182fc4d..07e4a2f1 100755 --- a/git-stacked-rebase.ts +++ b/git-stacked-rebase.ts @@ -1383,7 +1383,7 @@ git-stacked-rebase [-a|--apply] 2. but wil not push the partial branches to a remote until --push --force is used. -git-stacked-rebase [-c|--continue] +git-stacked-rebase [] (-c|--continue) (!) should be used instead of git-rebase's --continue @@ -1475,6 +1475,31 @@ git-stacked-rebase ${gitStackedRebaseVersionStr} __BUILD_DATE_REPLACEMENT_STR__ throw new Termination(helpMsg); } + if (["--continue", "-c"].includes(nameOfInitialBranch) && !process.argv.length) { + console.log("--continue without initialBranch"); + + /** + * TODO allow `null` / make optional + * + * both will need some intellisense to only allow + * in specific cases + * + * (unless we'll keep track of the + * current initial branch we're working with?) + * + */ + const initialBranch = ""; + + /** + * TODO call more appropraitely / extract default options + * so that it's less error-prone here + */ + return gitStackedRebase(initialBranch, { + gitDir, + continue: true, + }); + } + /** * TODO: improve arg parsing, lmao */