git-stacked-rebase icon indicating copy to clipboard operation
git-stacked-rebase copied to clipboard

argv-parser-rewrite

Open kiprasmel opened this issue 1 year ago • 0 comments

BREAKING CHANGE: completely overhaul arg parsing & allow invoking CLI w/o initialBranch

...as long as the initialBranch was already provided in some previous invocation of stacked-rebase, thus cached. sometime later, we could have a config for the default initial branch..

  • create generic utils for argv parsing (separate package soon?)

  • introduce multiple tests, which caught lots of (mostly new) bugs!

  • tidy up code at start of gitStackedRebase, which now makes great sense & looks nice

    • same in other places
  • clear up mental model of "parsing options" - it's "resolve" instead of "parse"

  • move initialBranch parsing into resolveOptions

    • don't want out of sync resolvedOptions.initialBranch vs nameOfInitialBranch
  • get rid of "intial branch is optional for some args" -- non issue

    • because e.g. for --continue to have any meaning, you'd have to have already started a stacked rebase & thus would have the initial branch cached.

kiprasmel avatar Apr 12 '23 17:04 kiprasmel