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

Version Path
rgitflow-0.2.2 lib/rgitflow/git_ext/lib.rb
rgitflow-0.2.1.pre.alpha.pre.32 lib/rgitflow/git_ext/lib.rb
rgitflow-0.2.1.pre.alpha.pre.28 lib/rgitflow/git_ext/lib.rb
rgitflow-0.2.0.pre.alpha.pre.27 lib/rgitflow/git_ext/lib.rb
rgitflow-0.2.0.pre.alpha.pre.26 lib/rgitflow/git_ext/lib.rb
rgitflow-0.2.0.pre.alpha.pre.25 lib/rgitflow/git_ext/lib.rb
rgitflow-0.2.0 lib/rgitflow/git_ext/lib.rb
rgitflow-0.2.0.pre.alpha.pre.23 lib/rgitflow/git_ext/lib.rb
rgitflow-0.2.0.pre.alpha.pre.22 lib/rgitflow/git_ext/lib.rb