Sort the network graph both by commit date and topographically
What does this MR do?
Previously (!10936 (merged)), we sorted commits for the network graph by date, which seemed to work okay.
The one edge case where this failed was when multiple commits have the same commit date (for example: when a range of commits are cherry picked with a single command, they all have the same commit date [and different author dates]).
Commits with the same commit date would be sorted arbitrarily, and usually break the network graph.
This commit solves the problem by both sorting by date, and by sorting topographically (parents aren't displayed until all their children are displayed)
A more detailed explanation is present here: https://gitlab.com/gitlab-org/gitlab-ce/issues/30973#note_28706230
Are there points in the code the reviewer needs to double check?
- The spec added in
graph_specruns in quadratic time, but I thought this was okay because it deals with a small number of items. Please feel free to disagree. :)
- Are there any cases where the network graph might break even with this dual sorting strategy?
Screenshots (if relevant)
What are the relevant issue numbers?
Closes #30973 (closed)
- Reproduce the issue
Does it happen on
- What about earlier versions?
- CHANGELOG entry created
API support added
Branch has no merge conflicts with
- Squashed related commits together
- Added screenshots
- Check for clean merge with EE
- Wait for merge