Displays available branches.
191107
def display_available_branches(self):
        """"""

        if not self.repo.remotes:
            remote_branches = False
        else:
            remote_branches = True
        branches = self.get_branches(local=True, remote_branches=remote_branches)

        if not branches:
            click.echo(crayons.red('No branches available'))
            return

        branch_col = len(max([b.name for b in branches], key=len)) + 1

        for branch in branches:

            try:
                branch_is_selected = (branch.name == self.get_current_branch_name())
            except TypeError:
                branch_is_selected = False

            marker = '*' if branch_is_selected else ' '
            color = colored.green if branch_is_selected else colored.yellow
            pub = '(published)' if branch.is_published else '(unpublished)'

            click.echo(columns(
                [colored.red(marker), 2],
                [color(branch.name, bold=True), branch_col],
                [black(pub), 14]
            ))
800795
def branches(type = :master, dir = Dir.pwd, _options = {})
      FalkorLib::Git.config("gitflow.branch.#{type}", dir)
      #confs[type.to_sym]
    end
1170477
def find_branches(self):
        """"""
        for prefix, name, revision_id in self.find_branches_raw():
            yield Revision(
                branch=name,
                repository=self,
                revision_id=revision_id,
            )
460525
private void displaySelected() {
		copySelection(table1, selected1);
		copySelection(table2, selected2);
		copySelection(table3, selected3);
	}
1308799
def get_branches(path):
    
    code, output = call(path, 'branch', '--list')
    if code > 0:
        return None
    branches = output.split('\n')
    newbr = [None]
    for br in branches:
        if br:
            if br[0] == '*':
                newbr[0] = br[2:]
            else:
                newbr.append(br[2:])
    return newbr
641605
def current_branch(self):
        """"""
        branch_name = git(self.gitdir, self.gitwd, "symbolic-ref", "HEAD")
        return branch_name.replace('refs/heads/', '').strip()
877385
public function show(string $branch, array $params = [])
    {
        $path = $this->buildBranchesPath($branch);

        return $this->get($path, $params);
    }
181835
protected void writeBranchCounts(final BranchCounts branch,
    final BitOutputStream out) throws IOException {
    final CodeType currentCodeType = this.getType(branch.path);
    long maximum = branch.size;
    assert maximum >= branch.terminals;
    if (currentCodeType == CodeType.Unknown) {
      this.writeTerminalCount(out, branch.terminals, maximum);
    }
    else if (currentCodeType == CodeType.Terminal) {
      assert branch.size == branch.terminals;
      assert 0 == branch.zeroCount;
      assert 0 == branch.oneCount;
    }
    else assert currentCodeType != CodeType.Prefix || 0 == branch.terminals;
    maximum -= branch.terminals;

    assert maximum >= branch.zeroCount;
    if (0 < maximum) {
      this.writeZeroBranchSize(out, branch.zeroCount, maximum, branch.path);
      maximum -= branch.zeroCount;
    }
    else {
      assert 0 == branch.zeroCount;
    }
    assert maximum == branch.oneCount;
  }
1219950
def show_dependencies(self, stream=sys.stdout):
        """"""
        def child_iter(node):
            return [d.node for d in node.deps]

        def text_str(node):
            return colored(str(node), color=node.status.color_opts["color"])

        for task in self.iflat_tasks():
            print(draw_tree(task, child_iter, text_str), file=stream)
98543
def branches(self):
        
        branches = []

        if self._taken_branch:
            branches += [(self._taken_branch, 'taken')]

        if self._not_taken_branch:
            branches += [(self._not_taken_branch, 'not-taken')]

        if self._direct_branch:
            branches += [(self._direct_branch, 'direct')]

        return branches
140022
def branches(self):
        """"""
        result = self.git(self.default + ['branch', '-a', '--no-color'])
        return [l.strip(' *\n') for l in result.split('\n') if l.strip(' *\n')]
987683
def _get_branch(repo, name):
    '''
    
    '''
    try:
        return [x for x in _all_branches(repo) if x[0] == name][0]
    except IndexError:
        return False
667467
def git_branch(self):
        """"""
        info = self.info
        return 'rpm-{major}.{minor}.x'.format(
            major=info[0], minor=info[1])
597007
def is_branch?(branch)
      branch_names = self.branches.map {|b| b.name}
      branch_names.include?(branch)
    end
467373
public void setBranches(String branches) {
                if (!GitTaskUtils.isNullOrBlankString(branches)) {
                        this.branchNames = branches.split(",");
                }
                else {
                        throw new GitBuildException("Cannot delete unspecified branches.");
                }
        }
267546
def branch(self):
        
        branch = [self]
        for c in self.children:
            branch += c.branch()
        return branch
1039954
def branches_containing(commit):
    """"""
    lines = run('branch --contains %s' % commit).splitlines()
    return [l.lstrip('* ') for l in lines]