stack-attack icon indicating copy to clipboard operation
stack-attack copied to clipboard

Broken commit history display if there's a visible merge commit

Open taneliang opened this issue 4 years ago • 0 comments

If there's a merge commit above the earliest interesting commit, our frontend vomits blood.

Steps to repro

  1. Clone repro repo: https://github.com/24r/stack-attack-issue-44-repro. These are the branches:
    • main: the main branch, which includes a merge commit
    • eic: a branch pointing to the earliest interesting commit. This branch exists so that the interesting commit graph will contain a merge commit. This also means that if you delete this branch, Stack Attack will display the commit graph correctly.
    • c: just a random feature branch
  2. See Git commit graph: image
  3. Launch Stack Attack
  4. See the commit graph. The merge commit and everything above it are duplicated: image

Steps to resolve

  • [ ] Confirm that GSC is producing the commit graph correctly (it probably is). If it is, this bug is in the frontend
  • [ ] Decide how we want to solve this bug. Displaying a proper commit graph like Git may be too difficult as we'll need to implement a proper topographical sort of the commit history. We could try to find another way to display merge commits, e.g. maybe only showing merge commits when hasFork in displayCommitsForSubgraphRootedAtCommit is false.

taneliang avatar Aug 15 '20 09:08 taneliang