# Restore checkpoint store abstraction boundary

`d4e9717`→[main](/content/gh/entireio/cli/commits/main/index.html)

## Sessions

d52beee4662fView transcript

## Changes

2

- cmd/entire/cli
  
  - checkpoint
    
    - Mopen.go+5/-3

- strategy
    
    - Mmanual_commit.go+2/-2

```
23 unmodified lines

24
25
26
27
27
28
29
29
30
31
32
22 unmodified lines

55
56
57
58
58
59
60
61
62
63

23 unmodified lines

// temporary capability and resolved committed-ref topology.
type Stores struct {
	// Primary is the committed store that serves committed reads and writes.
	Primary *GitStore
	Primary CommittedStore

temporary *GitStore
	temporary TemporaryStore
	refs      CommittedRefs
}

22 unmodified lines

// Temporary returns the git-backed temporary shadow-branch store.
func (s *Stores) Temporary() *GitStore { return s.temporary }
func (s *Stores) Temporary() TemporaryStore { //nolint:ireturn // temporary store capability is the abstraction boundary
	return s.temporary
}

// Refs returns the resolved committed-ref topology.
func (s *Stores) Refs() CommittedRefs { return s.refs }
```

Mcmd/entire/cli/checkpoint/open.go+5/-3

```
51 unmodified lines

52
53
54
55
55
56
57
58
3 unmodified lines

62
63
64
65
65
66
67
68

51 unmodified lines

// topology. Writes target refs.Primary; reads target refs.Read. The strategy's
// blob fetcher is wired in so reads can fetch blobs on demand after a treeless
// fetch.
func (s *ManualCommitStrategy) getCheckpointStore(ctx context.Context, repo *git.Repository) (*checkpoint.GitStore, error) {
func (s *ManualCommitStrategy) getCheckpointStore(ctx context.Context, repo *git.Repository) (checkpoint.CommittedStore, error) { //nolint:ireturn // committed store capability is the abstraction boundary
	stores, err := s.getCheckpointStores(ctx, repo)
	if err != nil {
		return nil, err
	}
3 unmodified lines

// getTemporaryStore returns the git-backed shadow-branch store with the
// strategy's blob fetcher wired in.
func (s *ManualCommitStrategy) getTemporaryStore(ctx context.Context, repo *git.Repository) (*checkpoint.GitStore, error) {
func (s *ManualCommitStrategy) getTemporaryStore(ctx context.Context, repo *git.Repository) (checkpoint.TemporaryStore, error) { //nolint:ireturn // temporary store capability is the abstraction boundary
	stores, err := s.getCheckpointStores(ctx, repo)
	if err != nil {
		return nil, err
	}
``

Mcmd/entire/cli/strategy/manual_commit.go+2/-2
