address PR review feedback · Entire

address PR review feedback

84186e5→main·

pfleidi·1mo ago·2 files·+3 added/-4 removed

push_common: build the temp fetch ref from the full ref name (minus the refs/ prefix) instead of Short(). Short() collapses well-known prefixes and can map distinct refs to the same temp ref name.

store: tighten the GitStore docstring to make clear the store does not advance refs.Mirror; that is handled by callers.

Sessions

47785ff3bf54View transcript

[?
Streamline Checkpoint Version Mirroring with refs.PrimaryClaude Code·2 steps](/content/gh/entireio/cli/session/7d8b9a47-6f94-441b-adae-5402ded54425#timeline-47785ff3bf54/index.html)

Changes

2

8 unmodified lines

9
10
11
12
13
14
12
13
14
15
16

8 unmodified lines

var _ Store = (*GitStore)(nil)

// GitStore provides operations for both temporary and committed checkpoint
// storage. It wraps a git repository and owns the committed-metadata ref
// topology: writes target refs.Primary, committed reads resolve against
// refs.Read, and mirror advancement runs through strategy.AdvanceCommittedPrimary.
// storage. Writes target refs.Primary; committed reads resolve against
// refs.Read. The store does not advance refs.Mirror.
type GitStore struct {
    repo        *git.Repository
    refs        CommittedRefs
}

Mcmd/entire/cli/checkpoint/store.go+2/-3

356 unmodified lines

357
358
359
360
360
361
362
363

356 unmodified lines

var refSpec string
    usedTempRef := remote.IsURL(fetchTarget) || !ref.IsBranch()
    if usedTempRef {
        tmpRef := "refs/entire-fetch-tmp/" + ref.Short()
        tmpRef := "refs/entire-fetch-tmp/" + strings.TrimPrefix(ref.String(), "refs/")
        refSpec = fmt.Sprintf("+%%s:%%s", ref.String(), tmpRef)
        fetchedRefName = plumbing.ReferenceName(tmpRef)
    } else {

Mcmd/entire/cli/strategy/push_common.go+1/-1