-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathgit-new-fb
More file actions
executable file
·39 lines (25 loc) · 789 Bytes
/
git-new-fb
File metadata and controls
executable file
·39 lines (25 loc) · 789 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/env ruby
#require "rubygems"
#require "bundler/setup"
#$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '../lib')
require 'git-process/git_process_options'
require 'git-process/new_fb'
require 'git-process/git_lib'
include GitProc
class NewFeatureBranchOptions
include GitProcessOptions
def usage(filename)
"#{filename} [options] branch_name"
end
def empty_argv_ok?
false
end
def extend_opts(parser)
parser.opt :local, "Do not do a fetch first if there is a remote defined", :short => :l, :default => false
end
def post_parse(opts, argv)
opts[:branch_name] = argv.shift
end
end
opts = NewFeatureBranchOptions.new.parse_cli(File.basename(__FILE__), ARGV)
GitProc::NewFeatureBranch.new(GitProc::GitLib.new('.', opts), opts).run