emu-sh / .oh-my-comma

The idea of a 'workbench for developers' - Shell utilities, tooling, and dotfiles for comma.ai's open-source self-driving car technology stack
http://www.emu.sh/.oh-my-comma/
Creative Commons Zero v1.0 Universal
124 stars 17 forks source link

Add -b flag to fork switch #37

Closed AskAlice closed 4 years ago

AskAlice commented 4 years ago

Previous behavior was to always require username and branch would be assumed to be default if not specified.

New behavior allows user to type emu fork switch -b cool_branch_name. The username is assumed to the current fork the user has switched to last. If the user wants to switch to another fork and branch, then the only difference is they have to type emu fork switch another_fork_user -b another_branch (add -b in front of branch).

The new print to let the user know what's happening when only branch is specified:

root@localhost:/data/$ emu fork switch -b stock_additions-075
No username specified, using current fork: shanesmiskol
Fetching shanesmiskol's latest changes...
Successfully checked out shanesmiskol/stock_additions-075 as shanesmiskol_stock_additions-075

I need to test what happens right after the user sets up fork management, so don't merge yet. I'll also bump the version and update the changelog soon.

Edit: