/*
 */
// func (b *Branch) hasBranches() bool {
// 	return len(b.Branches) == 0
// }
/*
 */
544680
func (b *Branch) hasBranch(idx byte) bool {
	if _, present := b.Branches[idx]; present {
		return true
	}
	return false
}
602180
func (s *CreateBranchOutput) SetBranch(v *Branch) *CreateBranchOutput {
	s.Branch = v
	return s
}
12407
func (s *GitConfig) SetBranch(v string) *GitConfig {
	s.Branch = &v
	return s
}
888816
func (node *Node) has(t *ImmutableTree, key []byte) (has bool) {
	if bytes.Equal(node.key, key) {
		return true
	}
	if node.isLeaf() {
		return false
	}
	if bytes.Compare(key, node.key) < 0 {
		return node.getLeftNode(t).has(t, key)
	}
	return node.getRightNode(t).has(t, key)
}
836445
func HasEllipses(args ...string) bool {
	var ok = true
	for _, arg := range args {
		ok = ok && (strings.Count(arg, ellipses) > 0 || (strings.Count(arg, openBraces) > 0 && strings.Count(arg, closeBraces) > 0))
	}
	return ok
}
649927
func (a Annotation) HasAll(expected map[string]string) bool {
	for k, v := range expected {
		if !a.Has(k, v) {
			return false
		}
	}
	return true
}
342737
func (d *indexData) gatherBranches(docID uint32, mt matchTree, known map[matchTree]bool) []string {
	foundBranchQuery := false
	var branches []string

	visitMatches(mt, known, func(mt matchTree) {
		bq, ok := mt.(*branchQueryMatchTree)
		if ok {
			foundBranchQuery = true
			branches = append(branches,
				d.branchNames[uint(bq.mask)])
		}
	})

	if !foundBranchQuery {
		mask := d.fileBranchMasks[docID]
		id := uint32(1)
		for mask != 0 {
			if mask&0x1 != 0 {
				branches = append(branches, d.branchNames[uint(id)])
			}
			id <<= 1
			mask >>= 1
		}
	}
	return branches
}
1274870
func HasFsckFunc(ctx context.Context) bool {
	imf, ok := ctx.Value(ctxKeyFsckFunc).(store.FsckCallback)
	return ok && imf != nil
}
679235
func (g *Graph) HasVertex(v Vertex) bool {
	return g.vertices.Include(v)
}
85650
func DeleteBranch(repoPath, name string, opts DeleteBranchOptions) error {
	cmd := NewCommand("branch")

	if opts.Force {
		cmd.AddArguments("-D")
	} else {
		cmd.AddArguments("-d")
	}

	cmd.AddArguments(name)
	_, err := cmd.RunInDir(repoPath)

	return err
}
1013947
func (f *File) hasBasicType(x ast.Expr, kind types.BasicKind) bool {
	t := f.pkg.types[x].Type
	if t != nil {
		t = t.Underlying()
	}
	b, ok := t.(*types.Basic)
	return ok && b.Kind() == kind
}
707418
func (ks *FSKeystore) Has(name string) (bool, error) {
	kp := filepath.Join(ks.dir, name)

	_, err := os.Stat(kp)

	if os.IsNotExist(err) {
		return false, nil
	}

	if err != nil {
		return false, err
	}

	if err := validateName(name); err != nil {
		return false, err
	}

	return true, nil
}
866794
func (ini *Init) Branch(initFn func() (interface{}, error)) *Init {
	if ini == nil {
		ini = New()
	}
	return ini.add(true, initFn)
}
1285272
func (t *Tombstoner) HasTombstones() bool {
	files := t.TombstoneFiles()
	t.mu.RLock()
	n := len(t.tombstones)
	t.mu.RUnlock()

	return len(files) > 0 && files[0].Size > 0 || n > 0
}
618411
func (r *RepoResource) ListBranches(owner, slug string) ([]*Branch, error) {
	branchMap := map[string]*Branch{}
	path := fmt.Sprintf("/repositories/%s/%s/branches", owner, slug)

	if err := r.client.do("GET", path, nil, nil, &branchMap); err != nil {
		return nil, err
	}

	// The list is returned in a map ...
	// we really want a slice
	branches := []*Branch{}
	for _, branch := range branchMap {
		branches = append(branches, branch)
	}

	return branches, nil
}
779622
func (m *Model) Branches() ([]*Generation, error) {
	b, err := m.st.Branches()
	return b, errors.Trace(err)
}
730718
func (g *modelShim) Branches() ([]Generation, error) {
	branches, err := g.Model.Branches()
	if err != nil {
		return nil, errors.Trace(err)
	}

	res := make([]Generation, len(branches))
	for i, b := range branches {
		res[i] = b
	}
	return res, nil
}