mob
mob copied to clipboard
mob start: Checkout base branch locally if it doesnt exist
we were seeing this error when calling mob next (base branch is called register99):
ERROR git --no-pager log register99..mob/register99 --pretty=format:%an --abbrev-commit
ERROR fatal: ambiguous argument 'register99..mob/register99': unknown revision or path not in the working tree.
ERROR Use '--' to separate paths from revisions, like this:
I think this happens if someone joins the session by initially checking out the wip branch instead of the base branch? ie they did git checkout mob/register99; mob start, rather than git checkout register99; mob start.
so this is very much an edge case / a user having done the "wrong" thing.
but maybe it's nice to handle this case gracefully anyhow?
(apologies i still haven't figured out the tests)
Thank you @hjwp 😊 We would also need a test covering this scenario. Can you please add that? It should fail when your improvement is missing.