diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2017-08-02 13:42:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-02 13:42:19 +0200 |
commit | 902347aef9a7cd618c48e3baa1121b72e2beab68 (patch) | |
tree | b81859d6dfa3c580191a2ad60bc1b7d80a36991a /repository.go | |
parent | 9befb514d83e22268d00ab2c0fdd797b3742f0e9 (diff) | |
parent | ab655650034b2acf36ce0237acaaf28b5d2572c0 (diff) | |
download | go-git-902347aef9a7cd618c48e3baa1121b72e2beab68.tar.gz |
Merge pull request #531 from mcuadros/ref-name
plumbing: moved `Reference.Is*` methods to `ReferenceName.Is*`
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 92174d6..e2a18c4 100644 --- a/repository.go +++ b/repository.go @@ -541,7 +541,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) @@ -701,7 +701,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 } @@ -714,7 +714,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 } @@ -727,7 +727,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 } |