Commit e8e3083
authored
checkout_branch: support "-" argument (#322)
git natively supports `-` as an argument to `git switch` and `git
checkout`. It is shorthand for `@{-1}`, which is a way to refer to the
last branch you were on.
forgit used to interpret `-` as a branch name, detect that it does not
exist yet and create a new one with this name, which does not work.
Add a check whether `-` is passed on the command line and do not create
a new branch in this case1 parent b663d22 commit e8e3083
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
454 | 454 | | |
455 | 455 | | |
456 | 456 | | |
457 | | - | |
| 457 | + | |
458 | 458 | | |
459 | 459 | | |
460 | 460 | | |
| |||
0 commit comments