aboutsummaryrefslogtreecommitdiffstats
path: root/remote.go
diff options
context:
space:
mode:
Diffstat (limited to 'remote.go')
-rw-r--r--remote.go14
1 files changed, 12 insertions, 2 deletions
diff --git a/remote.go b/remote.go
index 7814255..e7028e8 100644
--- a/remote.go
+++ b/remote.go
@@ -120,13 +120,23 @@ func (r *Remote) getWantedReferences(spec []config.RefSpec) ([]*core.Reference,
return refs, err
}
+ wantTags := true
+ for _, s := range spec {
+ if !s.IsWildcard() {
+ wantTags = false
+ break
+ }
+ }
+
return refs, iter.ForEach(func(ref *core.Reference) error {
if ref.Type() != core.HashReference {
return nil
}
if !config.MatchAny(spec, ref.Name()) {
- return nil
+ if !ref.IsTag() || !wantTags {
+ return nil
+ }
}
_, err := r.s.ObjectStorage().Get(core.CommitObject, ref.Hash())
@@ -223,7 +233,7 @@ func (r *Remote) buildFetchedTags() error {
return nil
}
- _, err := os.Get(core.CommitObject, ref.Hash())
+ _, err := os.Get(core.AnyObject, ref.Hash())
if err == core.ErrObjectNotFound {
return nil
}