Skip to content

mob start: Checkout base branch locally if it doesnt exist #471

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hjwp
Copy link

@hjwp hjwp commented Jul 4, 2025

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)

@gregorriegler
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants