Skip to content

Fix partio rewind when checkpoint branch isn't fetched locally #170

@jcleira

Description

@jcleira

partio rewind --list returns "no checkpoint branch found" when partio/checkpoints/v1 doesn't exist locally. If checkpoints were pushed from another machine or a clone, the branch may exist on the remote but not be fetched. The current error is confusing because it implies checkpoints don't exist at all.

Fix

In runRewindList() (cmd/partio/rewind.go), when local branch verification fails:

  1. Check if the branch exists on the remote: git ls-remote --heads origin partio/checkpoints/v1
  2. If found on remote, print a helpful message:
    Checkpoint branch not fetched locally.
    Run: git fetch origin partio/checkpoints/v1:partio/checkpoints/v1
    
  3. If neither local nor remote has the branch, keep the current error.

Apply the same check in runRewindTo() for consistency.

Program

See: .minions/programs/fix-rewind-checkpoint-not-fetched.md

Inspired by: entireio/cli changelog v0.5.3 — "Resume failing when checkpoints aren't fetched locally yet"

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions