diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2017-08-02 13:13:46 +0200 |
---|---|---|
committer | Máximo Cuadros <mcuadros@gmail.com> | 2017-08-02 13:13:46 +0200 |
commit | ab655650034b2acf36ce0237acaaf28b5d2572c0 (patch) | |
tree | c6d277c2650712726445c6cb15c47ffa63676263 /repository.go | |
parent | 171b3a73e7ab7015f9eb8e98965e36dfb8ea9599 (diff) | |
download | go-git-ab655650034b2acf36ce0237acaaf28b5d2572c0.tar.gz |
*: use the new API for ReferenceName.Is* methods
Diffstat (limited to 'repository.go')
-rw-r--r-- | repository.go | 8 |
1 files changed, 4 insertions, 4 deletions
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 } |