Skip to content

fix(file_history): colour commits by remote reachability#177

Merged
dlyongemallo merged 1 commit into
mainfrom
improve_commit_colours
May 18, 2026
Merged

fix(file_history): colour commits by remote reachability#177
dlyongemallo merged 1 commit into
mainfrom
improve_commit_colours

Conversation

@dlyongemallo
Copy link
Copy Markdown
Owner

@dlyongemallo dlyongemallo commented May 18, 2026

Fixes #175.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves file-history subject colouring by distinguishing pushed vs unpushed commits based on remote reachability (not just remote-tip decorations), and updates rendering/docs/tests to match.

Changes:

  • Replace LogEntry.has_remote_ref with LogEntry.is_pushed, with a decoration-based fallback when reachability isn’t provided.
  • Add Git adapter logic to precompute a “pushed commit set” via git rev-list --remotes … (including rename-aware extension for --follow / line-trace rename detection).
  • Update file-history rendering to layer selection highlighting over the pushed/unpushed base highlight, and extend functional tests + docs accordingly.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
lua/diffview/vcs/log_entry.lua Renames/repurposes the commit push-state flag and adds a fallback inference path.
lua/diffview/vcs/adapters/git/init.lua Computes/extends a pushed commit set and passes is_pushed into LogEntry construction.
lua/diffview/scene/views/file_history/render.lua Uses is_pushed for ref-aware subject highlighting and layers selection highlight via add_hl().
lua/diffview/tests/functional/git_adapter_spec.lua Adds functional coverage for pushed-set computation and rename-based extension/idempotency.
lua/diffview/tests/functional/file_history_render_spec.lua Updates subject highlight tests and validates layered selection highlight behavior.
doc/diffview.txt Documents the new pushed/unpushed semantics and the layered selection highlight behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lua/diffview/vcs/adapters/git/init.lua
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Comment thread lua/diffview/tests/functional/git_adapter_spec.lua Outdated
Comment thread lua/diffview/vcs/adapters/git/init.lua
@dlyongemallo dlyongemallo force-pushed the improve_commit_colours branch from 2e23bcf to b28f683 Compare May 18, 2026 14:31
@dlyongemallo dlyongemallo force-pushed the improve_commit_colours branch from b28f683 to 5cced8f Compare May 18, 2026 14:40
@dlyongemallo dlyongemallo merged commit 2574deb into main May 18, 2026
7 checks passed
@dlyongemallo dlyongemallo deleted the improve_commit_colours branch May 18, 2026 14:40
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.

Improvements for pushed/unpushed commit color

2 participants