Sha256: d3e24eee48c05ee19252f3a856ee822465714c8e5ff86abd87b727803ea06046
Contents?: true
Size: 794 Bytes
Versions: 12
Compression:
Stored size: 794 Bytes
Contents
require 'git/lib' Git::Lib.class_eval do def push(remote, branch = 'master', opts = {}) # Small hack to keep backwards compatibility with the 'push(remote, branch, tags)' method signature. opts = {:tags => opts} if [true, false].include?(opts) arr_opts = [] arr_opts << '--force' if opts[:force] || opts[:f] arr_opts << '--delete' if opts[:delete] || opts[:d] arr_opts << remote command('push', arr_opts + [branch]) command('push', ['--tags'] + arr_opts) if opts[:tags] end def diff_shortstat(obj1 = 'HEAD', obj2 = nil, opts = {}) diff_opts = ['--shortstat'] diff_opts << obj1 diff_opts << obj2 if obj2.is_a?(String) diff_opts << '--' << opts[:path_limiter] if opts[:path_limiter].is_a? String command('diff', diff_opts) end end
Version data entries
12 entries across 12 versions & 1 rubygems