From ab655650034b2acf36ce0237acaaf28b5d2572c0 Mon Sep 17 00:00:00 2001 From: Máximo Cuadros Date: Wed, 2 Aug 2017 13:13:46 +0200 Subject: *: use the new API for ReferenceName.Is* methods --- repository.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'repository.go') diff --git a/repository.go b/repository.go index 00ffaf7..79c4d0a 100644 --- a/repository.go +++ b/repository.go @@ -538,7 +538,7 @@ func (r *Repository) fetchAndUpdateReferences( func (r *Repository) updateReferences(spec []config.RefSpec, resolvedHead *plumbing.Reference) (updated bool, err error) { - if !resolvedHead.IsBranch() { + if !resolvedHead.Name().IsBranch() { // Detached HEAD mode head := plumbing.NewHashReference(plumbing.HEAD, resolvedHead.Hash()) return updateReferenceStorerIfNeeded(r.Storer, head) @@ -698,7 +698,7 @@ func (r *Repository) Tags() (storer.ReferenceIter, error) { return storer.NewReferenceFilteredIter( func(r *plumbing.Reference) bool { - return r.IsTag() + return r.Name().IsTag() }, refIter), nil } @@ -711,7 +711,7 @@ func (r *Repository) Branches() (storer.ReferenceIter, error) { return storer.NewReferenceFilteredIter( func(r *plumbing.Reference) bool { - return r.IsBranch() + return r.Name().IsBranch() }, refIter), nil } @@ -724,7 +724,7 @@ func (r *Repository) Notes() (storer.ReferenceIter, error) { return storer.NewReferenceFilteredIter( func(r *plumbing.Reference) bool { - return r.IsNote() + return r.Name().IsNote() }, refIter), nil } -- cgit