aboutsummaryrefslogtreecommitdiffstats
path: root/repository.go
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2017-08-02 13:13:46 +0200
committerMáximo Cuadros <mcuadros@gmail.com>2017-08-02 13:13:46 +0200
commitab655650034b2acf36ce0237acaaf28b5d2572c0 (patch)
treec6d277c2650712726445c6cb15c47ffa63676263 /repository.go
parent171b3a73e7ab7015f9eb8e98965e36dfb8ea9599 (diff)
downloadgo-git-ab655650034b2acf36ce0237acaaf28b5d2572c0.tar.gz
*: use the new API for ReferenceName.Is* methods
Diffstat (limited to 'repository.go')
-rw-r--r--repository.go8
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
}