From 936d265b2bf92a5c51f8b992daf42adfca1edd27 Mon Sep 17 00:00:00 2001 From: Robert Kiel Date: Thu, 12 Jan 2017 08:38:08 -0500 Subject: [PATCH] Update commit.rb added support for -f to force a commit --- lib/feature/commit.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/feature/commit.rb b/lib/feature/commit.rb index fb54350..3b517fe 100644 --- a/lib/feature/commit.rb +++ b/lib/feature/commit.rb @@ -14,12 +14,13 @@ module Feature def execute 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 = comment.join(' ') comment = "#{parts[:feature]}: #{comment}" - git_commit comment + git_commit comment, force end end