Sha256: c749f5fa8e58f70e881b3e88e91832695eeab79147d16e25b3ddf80bfea62592

Contents?: true

Size: 496 Bytes

Versions: 6

Compression:

Stored size: 496 Bytes

Contents

require 'git-utils/command'

class PushBranch < Command

  def parser
    OptionParser.new do |opts|
      opts.banner = "Usage: git push-branch"
      opts.on_tail("-h", "--help", "this usage guide") do
        puts opts.to_s; exit 0
      end
    end
  end

  # Returns a command appropriate for executing at the command line
  def cmd
    c = ["git push --set-upstream origin #{current_branch}"]
    c << argument_string(unknown_options) unless unknown_options.empty?
    c.join(" ")
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
git-utils-0.6.2 lib/git-utils/push_branch.rb
git-utils-0.6.1 lib/git-utils/push_branch.rb
git-utils-0.6.0 lib/git-utils/push_branch.rb
git-utils-0.5.10 lib/git-utils/push_branch.rb
git-utils-0.5.9 lib/git-utils/push_branch.rb
git-utils-0.5.8 lib/git-utils/push_branch.rb