remotemobprogramming / mob

Tool for smooth git handover.
https://mob.sh
MIT License
1.66k stars 147 forks source link

Is it expected of `create` flag? #342

Closed raphaelkieling closed 1 year ago

raphaelkieling commented 1 year ago

Hello folks.

First, thanks for the awesome library.

For some reason, if i use --create any-name it will put the link for the timer link to https://timer.mob.sh/mob instead of https://timer.mob.sh/any-name.

Also, it runs the audio mob next instead of nothing which is the default behavior when i run mob start

image

Is it make sense to you? am i missing the proposal for the create flag?

hollesse commented 1 year ago

hi @raphaelkieling, the --create flag is just for a pushing a not yet pushed remote branch. That means if i create a local branch someBranch and do mob start this will fail as there is no remote branch. Instead I cloud do mob start --create this will push the local branch to your origin and then start the mob. So a the moment there is no additional parameter to --create as in your example.

That a timer was started in your example is because you were in the mob project. There we have a .mob config file which sets the timer room to mob. And as you can see there was a timer of zero minutes. This is a consequence of your parameter that should not be there. mob looks for a integer value to set your timer if you do mob start. Here we try to parse my-feature as this integer value of minutes, which results in zero.

In my opinion we should not start a timer at all if we got a parameter which isn't a number, or use the set default in the config instead. I will create an issue for this.

As you asked if you missed the proposal for the --create flag, in the README we have the following paragraph, did you see this?

Basic Commands(Options):
  start [<minutes>]                      Start a <minutes> timer
    [--include-uncommitted-changes|-i]   Move uncommitted changes to wip branch
    [--branch|-b <branch-postfix>]       Set wip branch to 'mob/<base-branch>-<branch-postfix>'
    [--create]                           Create the remote branch

Does this explain to you what the --create flag does? If not could you help me by finding a better description? I will close this issue as this is not a bug.