lib/docman/git_util.rb in docman-0.0.85 vs lib/docman/git_util.rb in docman-0.0.86
- old
+ new
@@ -14,17 +14,18 @@
@logger.info result if show_result and result
raise "ERROR: #{result}" unless $?.exitstatus == 0
result
end
- def self.squash_commits(commit_count, message = nil)
+ def self.squash_commits(commit_count, message = nil, tag = nil)
message = "$(git log --format=%B --reverse HEAD..HEAD@{1})" unless message
exec "reset --soft HEAD~#{commit_count}"
if Application::instance.options.has_key?('debug')
exec "commit --no-verify -m \"#{message}\""
else
exec "commit --quiet --no-verify -m \"#{message}\""
end
+ self.tag(Dir.pwd, tag) if tag
end
def self.reset_repo(path)
Dir.chdir path
exec 'reset --hard'