Sha256: 3ad332cf7da273f22576be55f3fcbdabfd87d62d169baa4d19c5f74d900bc7a4
Contents?: true
Size: 517 Bytes
Versions: 9
Compression:
Stored size: 517 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 end
Version data entries
9 entries across 9 versions & 1 rubygems