How furqanalishah/differ works
Differ is a terminal Git diff viewer. The main workflow loads Git changes, parses unified diff text into display rows, and presents them in an interactive terminal view with navigation, search, review marks, and optional sidebar. The README documents additional viewing modes and controls; sampled source confirms the main loading, parsing, and app structure, while some UI behavior is only partially excerpted.
Main entry points: app.go Viewer state · main.go CLI and setup · git.go Git diff loader · diff.go Diff parser
Components 13
Diff loading
- CLI and setup
main.go - Reload callback
main.go - Git diff loader
git.go - Diff parser
diff.go
Interactive viewer
- Viewer state
app.go - File navigation
app.go - Regex search
app.go - Viewed tracking
app.go - File sidebar
sidebar.go
Terminal interface
- Diff rendering
app.go
Other components
- User
- Git repository
- Terminal screen
Connections 16
- User → CLI and setup: starts
- CLI and setup → Reload callback: creates
- CLI and setup → Git diff loader: initial load
- Git diff loader → Git repository: reads diff
- Git diff loader → Reload callback: returns text
- Reload callback → Diff parser: parses output
- CLI and setup → Viewer state: starts viewer
- Viewer state → Reload callback: refreshes via
- Diff parser → Viewer state: provides rows
- Viewer state → File navigation: handles movement
- Viewer state → Regex search: handles queries
- Viewer state → Viewed tracking: tracks marks
- Viewer state → File sidebar: builds file list
- Viewer state → Diff rendering: draws view
- Diff rendering → Terminal screen: updates display
- Terminal screen → Viewer state: delivers input