Skip to content

Fix virtual graph lines claiming shared history#2775

Open
Shriram-Vasudevan wants to merge 2 commits into
git-up:masterfrom
Shriram-Vasudevan:fix-336-virtual-graph-lines
Open

Fix virtual graph lines claiming shared history#2775
Shriram-Vasudevan wants to merge 2 commits into
git-up:masterfrom
Shriram-Vasudevan:fix-336-virtual-graph-lines

Conversation

@Shriram-Vasudevan
Copy link
Copy Markdown

Fixes #336.

Summary

  • process real graph nodes before dummy/virtual branch-tip nodes when generating each layer
  • prevents a virtual branch tip from becoming the primary line for a shared commit and rendering the rest of its ancestry as thin/dashed
  • add a regression test with out-of-order committer dates, matching the rebase/amend scenario described in the issue

Verification

  • clang -fsyntax-only ... GitUpKit/Interface/GIGraph.m
  • git diff --no-index --check GitUp-baseline GitUp

Could not run the XCTest suite locally because this machine only has Command Line Tools installed; xcodebuild requires full Xcode. clang-format is also unavailable locally.

@lucasderraugh
Copy link
Copy Markdown
Collaborator

lucasderraugh commented May 11, 2026

Thanks for your submission. However, this appears to introduce new issues. Please verify improvements and include screenshots for visual changes like this before submitting PRs.

I'll leave this open for some time, but after a week I will likely close it if relevant fixes aren't made.

Before is left, this PR is right.
Screenshot 2026-05-11 at 4 34 59 PM

@Shriram-Vasudevan
Copy link
Copy Markdown
Author

Pushed follow-up commit 6ed58b7 to address this regression. The original fix was too broad because it processed every non-dummy node before every dummy node, which changed normal graph lane ordering such as the existing simple fixture. The new version only postpones lines whose primary line is actually virtual, so ordinary dummy connector ordering stays unchanged while virtual branch tips still cannot claim shared ancestry as their primary dashed line.

Local verification:

  • clang -fsyntax-only -fobjc-arc -fmodules -DDEBUG=1 -D__GI_HAS_APPKIT__=0 ... GitUpKit/Interface/GIGraph.m -> passed
  • git diff --check -> passed

I still cannot run the full xcodebuild test suite or produce a local app screenshot on this machine because it only has Command Line Tools installed, not full Xcode/XCTest. The pushed commit should let the GitHub macOS CI verify the existing graph fixture plus the new regression test.

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Visual glitch in graph, thin dashed line all the way

2 participants