Sha256: 1d4e57163eabdfffd0c5541187f8332c0fef156a13ee1088c586a140afbacad8

Contents?: true

Size: 497 Bytes

Versions: 12

Compression:

Stored size: 497 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

12 entries across 12 versions & 1 rubygems

Version Path
git-utils-2.4.0 lib/git-utils/push_branch.rb
git-utils-2.3.0 lib/git-utils/push_branch.rb
git-utils-2.2.1 lib/git-utils/push_branch.rb
git-utils-2.2.0 lib/git-utils/push_branch.rb
git-utils-2.1.0 lib/git-utils/push_branch.rb
git-utils-2.0.0 lib/git-utils/push_branch.rb
git-utils-1.0.0 lib/git-utils/push_branch.rb
git-utils-0.7.1 lib/git-utils/push_branch.rb
git-utils-0.7.0 lib/git-utils/push_branch.rb
git-utils-0.6.5 lib/git-utils/push_branch.rb
git-utils-0.6.4 lib/git-utils/push_branch.rb
git-utils-0.6.3 lib/git-utils/push_branch.rb