Class: GitJump::Actions::List
Overview
Action to list tracked branches
Instance Attribute Summary
Attributes inherited from Base
#config, #database, #output, #repository
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from GitJump::Actions::Base
Instance Method Details
#execute ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/git_jump/actions/list.rb', line 9 def execute branches = database.list_branches(project_id) if branches.empty? output.info("No branches tracked for #{repository.project_basename}") output.info("Use 'git-jump add <branch>' to add branches or 'git-jump install' to setup automatic tracking") return true end current_branch = repository.current_branch output.branch_list(branches, current_branch) true end |