Skip to content

fix: make range begin resolve and persist immutable commit baselines #19

Description

@chtnnh

Problem

know-code range begin --from <invalid-ref> can succeed because merge-base failures fall back to the supplied string. Later range commands then treat Git failures as empty history/tree state. Unborn repositories also fail through an implicit HEAD assumption.

Scope

Validate --from as a commit, resolve it to an OID, require a real merge base, and store only immutable OIDs in the session. Define and test the intended unborn-repository behavior.

Acceptance criteria

  • Invalid, non-commit, and missing refs fail before writing a range session.
  • A valid ref is persisted as its resolved commit OID.
  • Git lookup failures cannot silently become an empty range or empty tree.
  • Tests cover invalid refs, ref movement after begin, and the selected unborn-repo behavior.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions