Skip to content

crit --range fails on clean working tree before applying range focus #471

@ewgdg

Description

@ewgdg

crit --range <base>..<head> still appears to initialize through working-tree change detection first. If current working tree has no changes, crit exits with:

Error: no changed files detected (after applying ignore patterns)

even when requested commit range has changed files.

Repro

In a repo where HEAD~1..HEAD has changes, but working tree is clean:

git status --short
# no output

git diff --name-status HEAD~1..HEAD
# M README.md

crit --range HEAD~1..HEAD --no-open

Expected

Crit opens range review for files changed in HEAD~1..HEAD.

Actual

Started crit daemon at http://localhost:<port> (PID <pid>)
Error: no changed files detected (after applying ignore patterns)

Version tested

v0.10.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions