twig 1.6 → 1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.travis.yml +2 -0
- data/HISTORY.md +27 -0
- data/README.md +41 -22
- data/bin/twig +12 -4
- data/bin/twig-checkout-child +56 -25
- data/bin/twig-checkout-parent +54 -26
- data/bin/twig-create-branch +40 -15
- data/bin/twig-diff +44 -25
- data/bin/twig-gh-open +43 -17
- data/bin/twig-gh-open-issue +51 -23
- data/bin/twig-gh-update +46 -20
- data/bin/twig-help +49 -5
- data/bin/twig-init +46 -13
- data/bin/twig-init-completion +46 -19
- data/bin/twig-init-completion-bash +50 -25
- data/bin/twig-init-config +77 -0
- data/bin/twig-rebase +85 -33
- data/config/twigconfig +47 -0
- data/lib/twig.rb +16 -10
- data/lib/twig/branch.rb +19 -12
- data/lib/twig/cli.rb +118 -183
- data/lib/twig/cli/help.rb +174 -0
- data/lib/twig/commit_time.rb +69 -14
- data/lib/twig/display.rb +19 -6
- data/lib/twig/github.rb +10 -8
- data/lib/twig/options.rb +22 -14
- data/lib/twig/subcommands.rb +13 -1
- data/lib/twig/system.rb +0 -2
- data/lib/twig/util.rb +0 -2
- data/lib/twig/version.rb +1 -1
- data/spec/spec_helper.rb +4 -3
- data/spec/twig/branch_spec.rb +100 -13
- data/spec/twig/cli/help_spec.rb +187 -0
- data/spec/twig/cli_spec.rb +34 -189
- data/spec/twig/commit_time_spec.rb +185 -16
- data/spec/twig/display_spec.rb +69 -48
- data/spec/twig/github_spec.rb +29 -15
- data/spec/twig/options_spec.rb +42 -13
- data/spec/twig/subcommands_spec.rb +35 -2
- data/spec/twig/system_spec.rb +5 -6
- data/spec/twig/util_spec.rb +20 -20
- data/spec/twig_spec.rb +21 -6
- data/twig.gemspec +14 -16
- metadata +23 -27
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
|
4
|
-
|
3
|
+
data.tar.gz: 652595cdad13fa87f888765b0ba912f0d21b840b
|
4
|
+
metadata.gz: 74cf0612d43de9ade52a217d2845d0bd899e19b5
|
5
5
|
SHA512:
|
6
|
-
|
7
|
-
|
6
|
+
data.tar.gz: 25b82c034a5d398bb78f25280b58c42f51cfc86b2857bdd16256de5685863f0fdfcb5421231beab411c0d883b2cb46c6f3e4b57f3cd37e951d72331818eab831
|
7
|
+
metadata.gz: d62797278db061c8b5858c0bcc0517ec0e4f0bfe8d75e8e06b443a7f82a1f8767b2c6a46c245b55a0b3a34d2588dd8620654cd4406a3661b0b57fa5e6f36fb5e
|
data/.travis.yml
CHANGED
data/HISTORY.md
CHANGED
@@ -1,6 +1,33 @@
|
|
1
1
|
Twig
|
2
2
|
====
|
3
3
|
|
4
|
+
1.7 (2014-07-29)
|
5
|
+
----------------
|
6
|
+
* ENHANCEMENT: Expand `twig init` to also create a default `~/.twigconfig` file.
|
7
|
+
This uses a new `twig init-config` subcommand behind the scenes.
|
8
|
+
* ENHANCEMENT: Add `twig help <subcommand>` for showing help content for any
|
9
|
+
built-in Twig subcommand (e.g., `twig help rebase`). To make a custom
|
10
|
+
subcommand work with this system (e.g., `twig help my-subcommand`), simply add
|
11
|
+
`--help` support to the subcommand (e.g., `twig my-subcommand --help`), and
|
12
|
+
Twig will call it automatically.
|
13
|
+
* ENHANCEMENT: List built-in subcommands in `twig help` with short descriptions
|
14
|
+
of each. (GH-32)
|
15
|
+
* ENHANCEMENT: Support `twig rebase --autoconfirm` for skipping the prompt when
|
16
|
+
rebasing a branch onto its parent branch. To skip the prompt every time you
|
17
|
+
use `twig rebase`, add `twig-rebase-autoconfirm: true` to your
|
18
|
+
`~/.twigconfig`. (GH-24. Thanks [ljharb](https://github.com/ljharb) for the
|
19
|
+
idea!)
|
20
|
+
* ENHANCEMENT: Suggest `twig --all` if there are no matching branches. (GH-33)
|
21
|
+
* ENHANCEMENT: Add Ruby 2.1.1 and 2.1.2 to official list of supported Rubies.
|
22
|
+
* FIX: Don't require a Git repo for initialization (e.g., `twig init`) or for
|
23
|
+
showing help content (e.g., `twig help rebase`).
|
24
|
+
* FIX: Show units of time for relative time strings when not using English.
|
25
|
+
(GH-37, GH-38. Thanks [matteosister](https://github.com/matteosister)!)
|
26
|
+
* FIX: Handle special shell characters (e.g., backticks, dollar signs) in branch
|
27
|
+
names and property values.
|
28
|
+
* FIX: Disable unsupported string formatting in Windows. (GH-39. Thanks
|
29
|
+
[rcdailey](https://github.com/rcdailey) for the bug report!)
|
30
|
+
|
4
31
|
1.6 (2014-03-04)
|
5
32
|
----------------
|
6
33
|
* ENHANCEMENT: Add `--only-property <pattern>` and `--except-property <pattern>`
|
data/README.md
CHANGED
@@ -5,9 +5,8 @@ Twig: Your personal Git branch assistant.
|
|
5
5
|
[](https://travis-ci.org/rondevera/twig)
|
6
6
|
|
7
7
|
It's hard enough trying to remember the names of all of your Git branches. You
|
8
|
-
also need
|
9
|
-
|
10
|
-
order, which just doesn't cut it.
|
8
|
+
also need their issue tracker ids, issue statuses, and reminders of what to do
|
9
|
+
next with each branch. `git branch` just isn't cutting it.
|
11
10
|
|
12
11
|
**Twig shows you your most recent branches, and remembers branch details for
|
13
12
|
you.** It supports subcommands, like automatically fetching statuses from your
|
@@ -32,9 +31,9 @@ Quick start
|
|
32
31
|
|
33
32
|
gem install twig
|
34
33
|
|
35
|
-
twig init
|
36
|
-
twig
|
37
|
-
twig
|
34
|
+
twig init # Sets up tab completion; one run works across all repos
|
35
|
+
twig # Lists your branches
|
36
|
+
twig help # More info
|
38
37
|
|
39
38
|
|
40
39
|
Usage
|
@@ -50,9 +49,9 @@ chronologically with their properties.
|
|
50
49
|
* `twig <property> -b <branch>`: Get property for any branch
|
51
50
|
* `twig <property> <value> -b <branch>`: Set property for any branch
|
52
51
|
* `twig --unset <property> -b <branch>`: Unset property for any branch
|
53
|
-
* `twig init`: Set up tab completion
|
52
|
+
* `twig init`: Set up tab completion and `~/.twigconfig`; one runs works across all repos
|
54
53
|
* `twig init-completion --force`: Update to the latest tab completion script
|
55
|
-
* `twig
|
54
|
+
* `twig help`: More info
|
56
55
|
|
57
56
|
|
58
57
|
Display options
|
@@ -71,7 +70,7 @@ Twig lists all of your branches by default (newest first), but you can filter
|
|
71
70
|
them by age, name, and custom properties:
|
72
71
|
|
73
72
|
* `twig --max-days-old <age>`:
|
74
|
-
Only list branches
|
73
|
+
Only list branches that were touched in the last # days
|
75
74
|
* `twig --only-branch <pattern>`:
|
76
75
|
Only list branches whose name matches a given pattern
|
77
76
|
* `twig --except-branch <pattern>`:
|
@@ -80,18 +79,30 @@ them by age, name, and custom properties:
|
|
80
79
|
Only list branches with a given property that matches a given pattern
|
81
80
|
* `twig --except-<property> <pattern>`:
|
82
81
|
Don't list branches with a given property that matches a given pattern
|
82
|
+
* `twig --only-property <pattern>`:
|
83
|
+
Only show columns for properties whose name matches a given pattern
|
84
|
+
* `twig --except-property <pattern>`:
|
85
|
+
Don't show columns for properties whose name matches a given pattern
|
83
86
|
* `twig --all`:
|
84
87
|
List all branches regardless of other filtering options
|
85
88
|
|
86
|
-
|
87
|
-
|
89
|
+
Saving favorite options
|
90
|
+
-----------------------
|
91
|
+
|
92
|
+
Running `twig init` generates a `~/.twigconfig` file with default options.
|
93
|
+
Afterwards, you can put your most frequently used options into this file, and
|
94
|
+
they'll automatically be included when you run `twig`. For example:
|
88
95
|
|
89
96
|
# ~/.twigconfig:
|
90
|
-
|
97
|
+
|
98
|
+
# Display options:
|
91
99
|
header-style: green bold
|
92
|
-
max-days-old: 30
|
93
100
|
reverse: true
|
94
101
|
|
102
|
+
# Filtering options:
|
103
|
+
except-branch: staging
|
104
|
+
max-days-old: 30
|
105
|
+
|
95
106
|
|
96
107
|
Examples
|
97
108
|
--------
|
@@ -179,11 +190,11 @@ current branch, you can use `twig checkout-child`:
|
|
179
190
|
# checkout that branch:
|
180
191
|
$ twig checkout-child
|
181
192
|
|
182
|
-
# If the current branch has multiple child, Twig asks what to do:
|
193
|
+
# If the current branch has multiple child branches, Twig asks what to do:
|
183
194
|
Checkout which child branch?
|
184
|
-
|
185
|
-
|
186
|
-
|
195
|
+
1. child-branch-1
|
196
|
+
2. child-branch-2
|
197
|
+
3. child-branch-3
|
187
198
|
> 3
|
188
199
|
Switched to branch 'child-branch-3'
|
189
200
|
|
@@ -298,6 +309,12 @@ More advanced usage:
|
|
298
309
|
# Pass options through to `git rebase`:
|
299
310
|
$ twig rebase -i
|
300
311
|
|
312
|
+
# Skip the prompt when rebasing:
|
313
|
+
$ twig rebase --autoconfirm
|
314
|
+
|
315
|
+
# Skip the prompt every time you run `twig rebase`:
|
316
|
+
$ echo 'twig-rebase-autoconfirm: true' >> ~/.twigconfig
|
317
|
+
|
301
318
|
|
302
319
|
twig gh-open
|
303
320
|
------------
|
@@ -311,7 +328,7 @@ open a browser window if possible:
|
|
311
328
|
GitHub URL: https://github.com/myname/myproject
|
312
329
|
|
313
330
|
For GitHub Enterprise or other installations, you can change
|
314
|
-
`https://github.com` by setting `github-uri-prefix` in `~/.
|
331
|
+
`https://github.com` by setting `github-uri-prefix` in `~/.twigconfig`.
|
315
332
|
|
316
333
|
|
317
334
|
twig gh-open-issue
|
@@ -329,7 +346,7 @@ subcommand to view that issue on GitHub:
|
|
329
346
|
GitHub issue URL: https://github.com/myname/myproject/issues/222
|
330
347
|
|
331
348
|
For GitHub Enterprise or other installations, you can change
|
332
|
-
`https://github.com` by setting `github-uri-prefix` in `~/.
|
349
|
+
`https://github.com` by setting `github-uri-prefix` in `~/.twigconfig`.
|
333
350
|
|
334
351
|
|
335
352
|
twig gh-update
|
@@ -369,7 +386,7 @@ Run `twig gh-update` periodically to keep up with GitHub issues locally.
|
|
369
386
|
|
370
387
|
For GitHub Enterprise or other installations, you can change the default
|
371
388
|
`https://api.github.com` endpoint prefix by setting `github-api-uri-prefix` in
|
372
|
-
`~/.
|
389
|
+
`~/.twigconfig`.
|
373
390
|
|
374
391
|
|
375
392
|
Writing a subcommand
|
@@ -408,8 +425,9 @@ add it to the [Twig wiki][wiki]!
|
|
408
425
|
More info
|
409
426
|
=========
|
410
427
|
|
411
|
-
* **Requirements:** Tested with Git 1.
|
412
|
-
|
428
|
+
* **Requirements:** Tested with Git 1.8.4+ and Ruby 1.8.7+ (see
|
429
|
+
[Travis CI config][travis-yml]) on OS X and other *nix systems. Might work
|
430
|
+
with older software and other systems, but it's not guaranteed.
|
413
431
|
* **Contributing:** Found a bug or have a suggestion? [Please open an
|
414
432
|
issue][issues] or ping [@ronalddevera on Twitter][twitter]. If you want to
|
415
433
|
hack on some features or contribute a subcommand you've written, feel free to
|
@@ -426,3 +444,4 @@ More info
|
|
426
444
|
[contributing]: https://github.com/rondevera/twig/blob/master/CONTRIBUTING.md
|
427
445
|
[history]: https://github.com/rondevera/twig/blob/master/HISTORY.md
|
428
446
|
[license]: https://github.com/rondevera/twig/blob/master/LICENSE.md
|
447
|
+
[travis-yml]: https://github.com/rondevera/twig/blob/development/.travis.yml
|
data/bin/twig
CHANGED
@@ -1,17 +1,25 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
3
|
# Entry point for Twig: <http://rondevera.github.io/twig/>
|
4
|
-
# More info: `twig
|
4
|
+
# More info: `twig help`
|
5
5
|
|
6
6
|
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib', 'twig'))
|
7
7
|
|
8
|
-
|
8
|
+
args = ARGV.dup
|
9
|
+
repo_required =
|
10
|
+
!args.include?('--help') &&
|
11
|
+
args[0] != 'help' && # e.g., `twig help <subcommand>`
|
12
|
+
args != ['--version'] &&
|
13
|
+
args != ['init'] &&
|
14
|
+
args != ['init-completion'] &&
|
15
|
+
args != ['init-completion-bash'] &&
|
16
|
+
args != ['init-config']
|
9
17
|
|
10
18
|
if repo_required && !Twig.repo?
|
11
|
-
abort
|
19
|
+
abort 'Current directory is not a git repository.'
|
12
20
|
end
|
13
21
|
|
14
22
|
# Gettin' twiggy wit' it.
|
15
23
|
twig = Twig.new
|
16
24
|
twig.read_config_file!
|
17
|
-
twig.read_cli_args!(
|
25
|
+
twig.read_cli_args!(args)
|
data/bin/twig-checkout-child
CHANGED
@@ -1,26 +1,5 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
-
# Synopsis:
|
4
|
-
#
|
5
|
-
# twig checkout-child [-b|--branch <branch>]
|
6
|
-
#
|
7
|
-
# Description:
|
8
|
-
#
|
9
|
-
# Checks out the current branch's child branch, if any, based on the child's
|
10
|
-
# `diff-branch` property. If the current branch has multiple child branches,
|
11
|
-
# this subcommand lists all of them and prompts for a selection.
|
12
|
-
#
|
13
|
-
# You can use this with `twig checkout-parent` to traverse your tree of
|
14
|
-
# branches.
|
15
|
-
#
|
16
|
-
# Options:
|
17
|
-
#
|
18
|
-
# `-b` or `--branch`: Checks out the child branch for the given branch, rather
|
19
|
-
# than the current branch.
|
20
|
-
#
|
21
|
-
# Subcommand for Twig: <http://rondevera.github.io/twig/>
|
22
|
-
# Author: Ron DeVera <http://rondevera.com>
|
23
|
-
|
24
3
|
require 'rubygems'
|
25
4
|
require 'twig'
|
26
5
|
|
@@ -28,10 +7,60 @@ def checkout_branch(branch_name)
|
|
28
7
|
`git checkout "#{branch_name}"`
|
29
8
|
end
|
30
9
|
|
10
|
+
def help_content
|
11
|
+
<<-HELP
|
12
|
+
|
13
|
+
twig-checkout-child
|
14
|
+
===================
|
15
|
+
|
16
|
+
Checks out a branch's child branch, if any.
|
17
|
+
|
18
|
+
Synopsis
|
19
|
+
--------
|
20
|
+
|
21
|
+
twig checkout-child [-b|--branch <branch>]
|
22
|
+
|
23
|
+
Description
|
24
|
+
-----------
|
25
|
+
|
26
|
+
Checks out the current branch's child branch, if any, based on the child's
|
27
|
+
`diff-branch` property. If the current branch has multiple child branches,
|
28
|
+
this subcommand lists all of them and prompts for a selection.
|
29
|
+
|
30
|
+
You can use this with `twig checkout-parent` to traverse your tree of
|
31
|
+
branches.
|
32
|
+
|
33
|
+
Options
|
34
|
+
-------
|
35
|
+
|
36
|
+
`-b` or `--branch`: Checks out the child branch for the given branch, rather
|
37
|
+
than the current branch.
|
38
|
+
|
39
|
+
See also
|
40
|
+
--------
|
41
|
+
|
42
|
+
twig-checkout-parent
|
43
|
+
twig-create-branch
|
44
|
+
|
45
|
+
Subcommand for Twig: <http://rondevera.github.io/twig/>
|
46
|
+
Author: Ron DeVera <http://rondevera.com>
|
47
|
+
|
48
|
+
HELP
|
49
|
+
end
|
50
|
+
|
51
|
+
args = ARGV.dup
|
52
|
+
|
53
|
+
if args.include?('--help')
|
54
|
+
puts help_content
|
55
|
+
exit
|
56
|
+
end
|
57
|
+
|
31
58
|
twig = Twig.new(:read_options => true)
|
32
|
-
|
33
|
-
target_branch_regexp = Regexp.new("\\A#{
|
34
|
-
|
59
|
+
target_branch_name = twig.target_branch_name
|
60
|
+
target_branch_regexp = Regexp.new("\\A#{target_branch_name}\\z")
|
61
|
+
parent_property = Twig::Branch::PARENT_PROPERTY
|
62
|
+
|
63
|
+
twig.set_option(:property_only, parent_property.to_sym => target_branch_regexp)
|
35
64
|
child_branch_names = twig.branches
|
36
65
|
|
37
66
|
if child_branch_names.size > 1
|
@@ -46,5 +75,7 @@ if child_branch_names.size > 1
|
|
46
75
|
elsif child_branch_names.size == 1
|
47
76
|
checkout_branch(child_branch_names.first)
|
48
77
|
else
|
49
|
-
abort "
|
78
|
+
abort %{The branch "#{target_branch_name}" has no known child branches.\n} \
|
79
|
+
"To set this as parent branch for some child branch, run:\n\n" \
|
80
|
+
" twig diff-branch #{target_branch_name} -b <child branch name>"
|
50
81
|
end
|
data/bin/twig-checkout-parent
CHANGED
@@ -1,35 +1,63 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
-
# Synopsis:
|
4
|
-
#
|
5
|
-
# twig checkout-parent [-b|--branch <branch>]
|
6
|
-
#
|
7
|
-
# Description:
|
8
|
-
#
|
9
|
-
# Checks out the current branch's parent branch, if any, based on the current
|
10
|
-
# branch's `diff-branch` property.
|
11
|
-
#
|
12
|
-
# You can use this with `twig checkout-child` to traverse your tree of
|
13
|
-
# branches.
|
14
|
-
#
|
15
|
-
# Options:
|
16
|
-
#
|
17
|
-
# `-b` or `--branch`: Checks out the parent branch of the given branch, rather
|
18
|
-
# than the current branch.
|
19
|
-
#
|
20
|
-
# Subcommand for Twig: <http://rondevera.github.io/twig/>
|
21
|
-
# Author: Ron DeVera <http://rondevera.com>
|
22
|
-
|
23
3
|
require 'rubygems'
|
24
4
|
require 'twig'
|
25
5
|
|
6
|
+
def help_content
|
7
|
+
<<-HELP
|
8
|
+
|
9
|
+
twig-checkout-parent
|
10
|
+
====================
|
11
|
+
|
12
|
+
Checks out a branch's parent branch.
|
13
|
+
|
14
|
+
Synopsis
|
15
|
+
--------
|
16
|
+
|
17
|
+
twig checkout-parent [-b|--branch <branch>]
|
18
|
+
|
19
|
+
Description
|
20
|
+
-----------
|
21
|
+
|
22
|
+
Checks out the current branch's parent branch, if any, based on the current
|
23
|
+
branch's `diff-branch` property.
|
24
|
+
|
25
|
+
You can use this with `twig checkout-child` to traverse your tree of branches.
|
26
|
+
|
27
|
+
Options
|
28
|
+
-------
|
29
|
+
|
30
|
+
`-b` or `--branch`: Checks out the parent branch of the given branch, rather
|
31
|
+
than the current branch.
|
32
|
+
|
33
|
+
See also
|
34
|
+
--------
|
35
|
+
|
36
|
+
twig-checkout-child
|
37
|
+
twig-create-branch
|
38
|
+
|
39
|
+
Subcommand for Twig: <http://rondevera.github.io/twig/>
|
40
|
+
Author: Ron DeVera <http://rondevera.com>
|
41
|
+
|
42
|
+
HELP
|
43
|
+
end
|
44
|
+
|
45
|
+
args = ARGV.dup
|
46
|
+
|
47
|
+
if args.include?('--help')
|
48
|
+
puts help_content
|
49
|
+
exit
|
50
|
+
end
|
51
|
+
|
26
52
|
twig = Twig.new(:read_options => true)
|
27
|
-
|
28
|
-
|
29
|
-
parent_branch = twig.get_branch_property(target_branch, parent_property) || ''
|
53
|
+
target_branch = twig.target_branch
|
54
|
+
parent_branch_name = target_branch.parent_name
|
30
55
|
|
31
|
-
if
|
32
|
-
|
56
|
+
if parent_branch_name && !parent_branch_name.empty?
|
57
|
+
exec %{git checkout "#{parent_branch_name}"}
|
33
58
|
else
|
34
|
-
|
59
|
+
parent_property = Twig::Branch::PARENT_PROPERTY
|
60
|
+
abort %{The branch "#{target_branch}" has no known parent branch.\n} \
|
61
|
+
"To set the parent branch, run:\n\n" \
|
62
|
+
" twig diff-branch <parent branch name> -b #{target_branch}"
|
35
63
|
end
|
data/bin/twig-create-branch
CHANGED
@@ -1,20 +1,45 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
3
|
+
def help_content
|
4
|
+
<<-HELP
|
5
|
+
|
6
|
+
twig-create-branch
|
7
|
+
==================
|
8
|
+
|
9
|
+
Creates a branch and sets its `diff-branch` property to the previous branch name.
|
10
|
+
|
11
|
+
Synopsis
|
12
|
+
--------
|
13
|
+
|
14
|
+
twig create-branch <branch>
|
15
|
+
|
16
|
+
Description
|
17
|
+
-----------
|
18
|
+
|
19
|
+
Creates a branch with the given name, and sets the new branch's `diff-branch`
|
20
|
+
property to the previous branch's name. This allows for traversing the branch
|
21
|
+
tree with `twig checkout-parent` and `twig checkout-child`.
|
22
|
+
|
23
|
+
See also
|
24
|
+
--------
|
25
|
+
|
26
|
+
twig-checkout-child
|
27
|
+
twig-checkout-parent
|
28
|
+
|
29
|
+
Subcommand for Twig: <http://rondevera.github.io/twig/>
|
30
|
+
Author: Ron DeVera <http://rondevera.com>
|
31
|
+
|
32
|
+
HELP
|
33
|
+
end
|
34
|
+
|
35
|
+
args = ARGV.dup
|
36
|
+
|
37
|
+
if args.include?('--help')
|
38
|
+
puts help_content
|
39
|
+
exit
|
40
|
+
end
|
41
|
+
|
42
|
+
new_branch_name = (args[0] || '').strip
|
18
43
|
abort 'Usage: twig create-branch <branch name>' if new_branch_name.empty?
|
19
44
|
|
20
45
|
current_branch_name = `git rev-parse --abbrev-ref HEAD`.strip
|