aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2016-10-27 02:42:36 +0200
committerMáximo Cuadros <mcuadros@gmail.com>2016-10-27 02:42:36 +0200
commit0c6c4047155692caff733d0cd239b80508b7bd04 (patch)
tree522bc02e7c5e4f4f3968a7b38c74bc9773097d1f /config
parent0c3bc0c8b3eabe16e927475f26044ca9aaa50351 (diff)
downloadgo-git-0c6c4047155692caff733d0cd239b80508b7bd04.tar.gz
remote, fix fetch tags
Diffstat (limited to 'config')
-rw-r--r--config/refspec.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/config/refspec.go b/config/refspec.go
index dae13be..9b5560d 100644
--- a/config/refspec.go
+++ b/config/refspec.go
@@ -59,14 +59,15 @@ func (s RefSpec) Src() string {
// Match match the given core.ReferenceName against the source
func (s RefSpec) Match(n core.ReferenceName) bool {
- if !s.isGlob() {
+ if !s.IsWildcard() {
return s.matchExact(n)
}
return s.matchGlob(n)
}
-func (s RefSpec) isGlob() bool {
+// IsWildcard returns true if the RefSpec contains a wildcard
+func (s RefSpec) IsWildcard() bool {
return strings.Index(string(s), refSpecWildcard) != -1
}
@@ -97,7 +98,7 @@ func (s RefSpec) Dst(n core.ReferenceName) core.ReferenceName {
dst := spec[start:len(spec)]
src := s.Src()
- if !s.isGlob() {
+ if !s.IsWildcard() {
return core.ReferenceName(dst)
}