Shallow retrieves the list of shallow commit hashes from Redis.
()
| 31 | |
| 32 | // Shallow retrieves the list of shallow commit hashes from Redis. |
| 33 | func (s *ShallowStorage) Shallow() ([]plumbing.Hash, error) { |
| 34 | key := withNamespace(s.namespacePrefix, shallowPrefix, "") |
| 35 | |
| 36 | // Fetch all members of the set. |
| 37 | members, err := s.client.SMembers(ctx, key).Result() |
| 38 | if err != nil { |
| 39 | return nil, err |
| 40 | } |
| 41 | |
| 42 | var commits []plumbing.Hash |
| 43 | for _, member := range members { |
| 44 | commits = append(commits, plumbing.NewHash(member)) |
| 45 | } |
| 46 | |
| 47 | return commits, nil |
| 48 | } |
nothing calls this directly
no test coverage detected