Skip to content

Adds commit reachability display in Commit Details and Graph Details views #4737

@eamodio

Description

@eamodio

Summary

Adds ability to display which branches and tags contain a specific commit, helping users understand commit propagation across the repository structure.

Impact

Benefits users by:

  • Providing visibility into commit reachability without leaving the Commit Details or Graph Details views
  • Helping users quickly identify which branches contain specific changes
  • Improving understanding of release coverage by showing tags containing commits
  • Supporting debugging workflows by revealing where commits have been merged

Improves developer productivity through inline branch/tag information, reducing context switching to terminal commands like git branch --contains or git tag --contains.

Validation

  1. Open GitLens Commit Details view for any commit
  2. Click "Show Branches & Tags" action chip
  3. Verify loading state displays with spinner
  4. Confirm branches and tags containing the commit are displayed
  5. Verify current branch is highlighted
  6. Test clicking range chip (multiple refs) shows popover with full list
  7. Verify error state with retry button on failure
  8. Confirm "Not on any branch or tag" warning for orphaned commits
  9. Test telemetry events fire correctly (commitDetails/reachability/loaded and /failed)
  10. Verify caching prevents redundant Git operations (60 min TTL, 25 commit capacity per repo)

Risk

Low - Read-only feature with isolated implementation:

  • Uses existing Git sub-provider pattern
  • Opt-in user interaction (click to load)
  • Graceful error handling with retry mechanism
  • Cached results prevent performance impact
  • New telemetry events track success/failure rates
  • No changes to core Git operations or data structures

Potential regressions:

  • Performance impact on repos with hundreds of branches/tags (mitigated by caching with LRU eviction)
  • UI layout shifts in Commit Details view (new row added conditionally)

Metadata

Metadata

Assignees

Labels

area-gitIssues or features related to using Gitarea-graph-detailsIssues or features related to the Commit Graph detailsarea-inspectIssues or features related to the Inspect viewverified ✔Verified

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions