Skip to content

fix: open and stage entries with no hunks, and surface git's own errors - #43

Merged
undont merged 7 commits into
mainfrom
fix/local-diffs
Aug 19, 2026
Merged

fix: open and stage entries with no hunks, and surface git's own errors#43
undont merged 7 commits into
mainfrom
fix/local-diffs

Conversation

@undont

@undont undont commented Aug 19, 2026

Copy link
Copy Markdown
Owner

Summary

  • open entries containing no hunks (chmod, empty new file, trailing-newline-only edit, rename, moved submodule pointer) on a diff naming the reason, instead of a panel row that did nothing and said "no changes" on every try
  • name a submodule pointer move for what it is rather than reporting it as empty
  • stage whole-file entries where s/u say they will: binary files, those zero-hunk changes, and a new file opened from a split's left column previously stepped to another file instead
  • report git's own error when a listing fails, so a mistyped revspec surfaces fatal: bad revision rather than "no changes for this source"; covers the panel, :Differ log and :Differ log <range>
  • count untracked lines from disk once and cache until mtime or size moves; every build and refresh used to re-read them, and any non-binary file containing a carriage return also left a loose object in .git/objects each time
  • bound the :Differ pr checkout fetch (M.fetch_timeout_ms, 20s) and disable credential prompts (it froze nvim for as long as a slow remote took, and hung for good on a prompt), and hand back a message when git fails to spawn instead of a Lua error

Test plan

  • make check clean (fmt, luacheck, golangci-lint, lua_ls, go vet, demo build)
  • lua unit 387/0, headless-nvim 480/0
  • go tests pass

@undont
undont merged commit 342ef5b into main Aug 19, 2026
11 checks passed
@undont
undont deleted the fix/local-diffs branch August 19, 2026 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant