aboutsummaryrefslogtreecommitdiffstats
path: root/config/refspec.go
diff options
context:
space:
mode:
Diffstat (limited to 'config/refspec.go')
-rw-r--r--config/refspec.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/config/refspec.go b/config/refspec.go
index dd68edc..9441df8 100644
--- a/config/refspec.go
+++ b/config/refspec.go
@@ -49,7 +49,7 @@ func (s RefSpec) Validate() error {
return ErrRefSpecMalformedWildcard
}
-// IsForceUpdate returns if update is allowed in non fast-forward merges
+// IsForceUpdate returns if update is allowed in non fast-forward merges.
func (s RefSpec) IsForceUpdate() bool {
if s[0] == refSpecForce[0] {
return true
@@ -67,7 +67,7 @@ func (s RefSpec) IsDelete() bool {
return false
}
-// Src return the src side
+// Src return the src side.
func (s RefSpec) Src() string {
spec := string(s)
start := strings.Index(spec, refSpecForce) + 1
@@ -76,7 +76,7 @@ func (s RefSpec) Src() string {
return spec[start:end]
}
-// Match match the given plumbing.ReferenceName against the source
+// Match match the given plumbing.ReferenceName against the source.
func (s RefSpec) Match(n plumbing.ReferenceName) bool {
if !s.IsWildcard() {
return s.matchExact(n)
@@ -85,7 +85,7 @@ func (s RefSpec) Match(n plumbing.ReferenceName) bool {
return s.matchGlob(n)
}
-// IsWildcard returns true if the RefSpec contains a wildcard
+// IsWildcard returns true if the RefSpec contains a wildcard.
func (s RefSpec) IsWildcard() bool {
return strings.Index(string(s), refSpecWildcard) != -1
}
@@ -110,7 +110,7 @@ func (s RefSpec) matchGlob(n plumbing.ReferenceName) bool {
strings.HasSuffix(name, suffix)
}
-// Dst returns the destination for the given remote reference
+// Dst returns the destination for the given remote reference.
func (s RefSpec) Dst(n plumbing.ReferenceName) plumbing.ReferenceName {
spec := string(s)
start := strings.Index(spec, refSpecSeparator) + 1
@@ -133,7 +133,7 @@ func (s RefSpec) String() string {
return string(s)
}
-// MatchAny returns true if any of the RefSpec match with the given ReferenceName
+// MatchAny returns true if any of the RefSpec match with the given ReferenceName.
func MatchAny(l []RefSpec, n plumbing.ReferenceName) bool {
for _, r := range l {
if r.Match(n) {