lib/rgitflow/tasks/feature/finish.rb in rgitflow-0.2.1.pre.alpha.pre.32 vs lib/rgitflow/tasks/feature/finish.rb in rgitflow-0.2.2
- old
+ new
@@ -18,15 +18,23 @@
unless branch.start_with? RGitFlow::Config.options[:feature]
error 'Cannot finish a feature branch unless you are in a feature branch'
abort
end
+ msg = %Q("merging #{branch} into #{RGitFlow::Config.options[:develop]}")
+
@git.branch(RGitFlow::Config.options[:develop]).checkout
- @git.merge branch, "merging #{branch} into #{RGitFlow::Config.options[:develop]}"
+ @git.merge branch
+ begin
+ @git.commit_all msg
+ rescue
+ status 'develop branch is up-to-date'
+ end
+
@git.push
if @git.is_remote_branch? branch
- @git.push('origin', branch, {:delete => true})
+ @git.push('origin', branch, { :delete => true })
end
@git.branch(branch).delete
status "Finished feature branch #{branch}!"
\ No newline at end of file