mlange-42 / git-graph

Command line tool to show clear git graphs arranged for your branching model
MIT License
517 stars 20 forks source link

Find a way to combine topological and chronological order #4

Closed mlange-42 closed 3 years ago

mlange-42 commented 3 years ago

Problem:

How git handles it:

For some considerations on that, and an algorithm for "remporal tolopogical sort", see https://pvigier.github.io/2019/05/06/commit-graph-drawing-algorithms.html

Later discovered that crate git2 allows to combine sort orders:

walk.set_sorting(git2::Sort::TOPOLOGICAL | git2::Sort::TIME)?;

which may already be the solution, but needs to be tested

mlange-42 commented 3 years ago

Solved through git2::Sort::TOPOLOGICAL | git2::Sort::TIME