diff options
author | Brenton Leanhardt <bleanhar@redhat.com> | 2008-06-24 18:59:42 -0400 |
---|---|---|
committer | Brenton Leanhardt <bleanhar@redhat.com> | 2008-06-24 18:59:42 -0400 |
commit | b73d3c8fb2039cb06be6a52d3a21dbc959f8f50c (patch) | |
tree | 6ad1452d68245ab7f7afec56aa4fb12650b47865 /lib/git/lib.rb | |
parent | 1adc5b8136c2cd6c694629947e1dbc49c8bffe6a (diff) | |
download | third_party-ruby-git-b73d3c8fb2039cb06be6a52d3a21dbc959f8f50c.tar.gz third_party-ruby-git-b73d3c8fb2039cb06be6a52d3a21dbc959f8f50c.tar.xz third_party-ruby-git-b73d3c8fb2039cb06be6a52d3a21dbc959f8f50c.zip |
Adding forcefull pushing
Diffstat (limited to 'lib/git/lib.rb')
-rw-r--r-- | lib/git/lib.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/git/lib.rb b/lib/git/lib.rb index 1aaf131..2998194 100644 --- a/lib/git/lib.rb +++ b/lib/git/lib.rb @@ -520,8 +520,12 @@ module Git command('fetch', remote.to_s) end - def push(remote, branch = 'master') - command('push', [remote.to_s, branch.to_s]) + def push(remote, branch = 'master', opts = {}) + arr_opts = [] + arr_opts << "--force" if opts[:force] + arr_opts << remote.to_s + arr_opts << branch.to_s + command('push', arr_opts) end def tag_sha(tag_name) |