Update commit.rb

added support for -f to force a commit
This commit is contained in:
Robert Kiel
2017-01-12 08:38:08 -05:00
committed by GitHub
parent 42ab12616b
commit 936d265b2b

View File

@@ -14,12 +14,13 @@ module Feature
def execute def execute
parts = parse_branch(current_branch) parts = parse_branch(current_branch)
comment = argv.reject { |x| x == '-m' } force = argv.include? '-f'
comment = argv.reject { |x| ['-m','-f'].include? x }
comment.shift if comment[0] == 'commit' comment.shift if comment[0] == 'commit'
comment = comment.join(' ') comment = comment.join(' ')
comment = "#{parts[:feature]}: #{comment}" comment = "#{parts[:feature]}: #{comment}"
git_commit comment git_commit comment, force
end end
end end