Skip to content

frog log rejects Windows repository roots #82

Description

@int3rrobang

Expected Behavior

On Windows, frog log should use the repository root returned by Git as the local file-store root.

Current Behavior

Frog 1.1.0 resolves the Git root as C:/... but Store.file normalizes it to C:\\...; log then rejects the equivalent paths with STORE_ROOT_MISMATCH before writing an entry.

This reproduces in a clean checkout of the upstream frog@1.1.0 tag, so it is not specific to a consumer repository.

Possible Solution

Normalize context.resolve().root with Node's path.resolve before constructing and comparing the file store:

const root = path.resolve((await Git.root({ cwd })) ?? cwd)

Centralizing the normalization there also protects other commands that compare a file store root, including sync.

Minimal Reproducible Example

On Windows, clone Frog and run from its Git checkout:

frog list
frog log "Windows root comparison probe" --body "probe" --severity minor

Expected: a pending local entry is created.

Actual:

code: STORE_ROOT_MISMATCH
message: The injected file store must use the same root as `--cwd`.

The same result occurred with the official frog-windows-x64-baseline.exe v1.1.0 release binary and the v1.1.0 source entrypoint.

Context

Windows 11 x64. The Git root was observed as C:/..., while the Node file store root was C:\\... for the same directory.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions