class Papa::Command::Git::Rebase

Public Class Methods

new(base_branch_name) click to toggle source
Calls superclass method Papa::Command::Base::new
# File lib/papa/command/git/rebase.rb, line 9
def initialize(base_branch_name)
  @base_branch_name = base_branch_name
  command = "git rebase #{@base_branch_name}"
  super(command)
end

Public Instance Methods

cleanup() click to toggle source
Calls superclass method Papa::Command::Base#cleanup
# File lib/papa/command/git/rebase.rb, line 20
def cleanup
  super
  queue = [
    Git::RebaseAbort.new,
    Git::Checkout.new(current_branch)
  ]
  runner = Runner.new(queue)
  runner.run
end
failure_message() click to toggle source
Calls superclass method Papa::Command::Base#failure_message
# File lib/papa/command/git/rebase.rb, line 30
def failure_message
  super
  message = "Failed to rebase #{current_branch} from #{@base_branch_name}. Merge conflict?"
  Helper::Output.error message
  message
end
run() click to toggle source
Calls superclass method Papa::Command::Base#run
# File lib/papa/command/git/rebase.rb, line 15
def run
  current_branch # Store current branch before executing command
  super
end