• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

umputun / revdiff / 23972507754

04 Apr 2026 05:43AM UTC coverage: 92.019% (+0.3%) from 91.705%
23972507754

push

github

web-flow
Add no-git file review mode for --only flag (#12)

* feat: add FallbackRenderer and FileReader for no-git file review

Add FallbackRenderer that wraps *diff.Git and falls back to reading files
from disk for --only patterns not found in the git diff. Add FileReader as
a standalone Renderer for use when no git repo is available. Both use a
shared readFileAsContext helper that reads files as all-context DiffLines.

* feat: wire up makeRenderer for git/no-git renderer selection

Extract renderer-selection logic into makeRenderer() in cmd/revdiff/main.go.
When git is available, wrap diff.NewGit with FallbackRenderer. When no git
repo exists and --only is set, use FileReader directly. Add IsFileReader()
check in UI model to handle no-git mode gracefully.

* test: add context-only line tests for annotation store and syntax highlighting

Verify annotation store and syntax highlighting work correctly with
all-context DiffLines (no +/- changes), which is the mode used when
reviewing files outside of git diff.

* docs: update documentation for no-git file review mode

Update README with fallback behavior description, update CLAUDE.md with
new data flow details, and add context-only usage example to plugin
reference docs.

* fix: show line count instead of +0/-0 in status bar for context-only files

* docs: trim no-git mention from readme description

135 of 147 new or added lines in 3 files covered. (91.84%)

2525 of 2744 relevant lines covered (92.02%)

581.82 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

94.74
/diff/fallback.go


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc