Skip to content

Commit 53e2d9e

Browse files
Tim WundenbergTim Wundenberg
Tim Wundenberg
authored and
Tim Wundenberg
committed
feat: add shortcut for --create as -c
1 parent ac52ce6 commit 53e2d9e

File tree

7 files changed

+22
-7
lines changed

7 files changed

+22
-7
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# 5.3.4
2+
- Feature: Add shortcut for `mob start --create` as `mob start -c`.
3+
14
# 5.3.3
25
- Fix: `mob start` now functions correctly on WIP branches when the base branch is not checked out, applicable to branch names that do not contain a `-` character.
36

CONTRIBUTING.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,14 @@ Running single test files during development is probably easiest in your IDE.
1515
To check if all tests are passing, simply run
1616

1717
```
18-
$ go test -v
18+
$ go test ./...
1919
```
2020

21-
To do some manual testing, you can install the new binary to `/usr/local/bin/`:
21+
To do some manual testing, you can run it in this repository or install the new binary to `/usr/local/bin/`:
2222

2323
```
24+
$ go run .
25+
OR
2426
$ ./install
2527
```
2628

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ Basic Commands(Options):
177177
[--include-uncommitted-changes|-i] Move uncommitted changes to wip branch
178178
[--discard-uncommitted-changes|-d] Discard uncommitted changes
179179
[--branch|-b <branch-postfix>] Set wip branch to 'mob/<base-branch>-<branch-postfix>'
180-
[--create] Create the remote branch
180+
[--create|-c] Create the remote branch
181181
[--room <room-name>] Set room name for timer.mob.sh once
182182
next
183183
[--stay|-s] Stay on wip branch (default)

configuration/configuration.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ func ParseArgs(args []string, configuration Configuration) (command string, para
150150
newConfiguration.DoneSquash = NoSquash
151151
case "--squash-wip":
152152
newConfiguration.DoneSquash = SquashWip
153-
case "--create":
153+
case "--create", "-c":
154154
newConfiguration.StartCreate = true
155155
case "--join", "-j":
156156
newConfiguration.StartJoin = true

configuration/configuration_test.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,16 @@ func TestParseArgsStartCreate(t *testing.T) {
3939
test.Equals(t, true, configuration.StartCreate)
4040
}
4141

42+
func TestParseArgsStartCreateShort(t *testing.T) {
43+
configuration := GetDefaultConfiguration()
44+
45+
command, parameters, configuration := ParseArgs([]string{"mob", "start", "-c"}, configuration)
46+
47+
test.Equals(t, "start", command)
48+
test.Equals(t, "", strings.Join(parameters, ""))
49+
test.Equals(t, true, configuration.StartCreate)
50+
}
51+
4252
func TestParseArgsStartJoin(t *testing.T) {
4353
configuration := GetDefaultConfiguration()
4454

help/help.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ Basic Commands with Options:
2020
[--include-uncommitted-changes|-i] Move uncommitted changes to wip branch
2121
[--discard-uncommitted-changes|-d] Discard uncommitted changes
2222
[--branch|-b <branch-postfix>] Set wip branch to 'mob/<base-branch>` + configuration.WipBranchQualifierSeparator + `<branch-postfix>'
23-
[--create] Create the remote branch
24-
[--join|-j] Join existing wip branch
23+
[--create|-c] Create the remote branch
24+
[--join|-j] Join existing wip branch
2525
[--room <room-name>] Set room name for timer.mob.sh once
2626
next
2727
[--stay|-s] Stay on wip branch (default)

mob.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import (
2121
)
2222

2323
const (
24-
versionNumber = "5.3.3"
24+
versionNumber = "5.3.4"
2525
minimumGitVersion = "2.13.0"
2626
)
2727

0 commit comments

Comments
 (0)