Skip to content

[Bug]: History graph loses its lines below a second root commit #25360

Closed

Description

@matbrgz

Operating system

macOS (Darwin 27.0, arm64). The bug is in shared, platform-independent code, so it affects Linux, Windows and SSH workspaces too.

Orca version (main @ sha)

main @ 51fe6f3

Details

Repro

  1. In any repo, merge an unrelated history (git merge --allow-unrelated-histories other) or create an orphan branch and merge it back.
  2. Open the history graph for a range that includes the second root commit.
  3. Below the root commit of the merged-in history, the lane that still leads to the first parent's history disappears: the graph shows a broken line, and the rows below start with no incoming lane.

Minimal model repro: buildGitHistoryViewModels([M(parents A,V), V(root), A(parent B), B(root)]). The V row receives lanes [A, V] but emits [], so the A row receives no lanes at all.

Root cause

src/shared/git-history-graph.ts:114 wraps the lane carry-forward loop in if (historyItem.parentIds.length > 0). A root commit has no parents, so the loop is skipped and every other lane still in flight is dropped instead of only ending the root's own lane. It is invisible in single-root history and only shows once a second root exists.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions