Class: Braid::Commands::Update

Inherits:
Braid::Command show all
Defined in:
lib/braid/commands/update.rb

Instance Method Summary collapse

Methods inherited from Braid::Command

#config, msg, run

Methods included from Operations::Git

#git_checkout, #git_commit, #git_fetch, #git_merge_base, #git_merge_ours, #git_merge_subtree, #git_read_tree, #git_remote_add, #git_reset_hard, #git_rev_parse, #git_rm_r, #local_changes?

Methods included from Operations::Helpers

#clean_svn_revision, #determine_target_commit, #display_revision, #extract_version, #find_git_revision, #validate_revision_option, #validate_svn_revision, #verify_version

Methods included from Operations::Mirror

#add_config_file, #check_merge_status, #create_work_branch, #fetch_remote, #find_remote, #get_current_branch, #get_work_head

Instance Method Details

#run(mirror, options = {}) ⇒ Object



4
5
6
7
8
9
10
# File 'lib/braid/commands/update.rb', line 4

def run(mirror, options = {})
  raise Braid::Git::LocalChangesPresent if invoke(:local_changes?)

  in_work_branch do
    mirror ? update_one(mirror, options) : update_all
  end
end