Skip to content

Change walk order from ByCommitTime to topological order#2991

Draft
peso wants to merge 1 commit into
gitui-org:masterfrom
peso:topo-order
Draft

Change walk order from ByCommitTime to topological order#2991
peso wants to merge 1 commit into
gitui-org:masterfrom
peso:topo-order

Conversation

@peso

@peso peso commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

This is preparation for a graph implementation.

Currently, commits are sorted by commit time without regard to parent-child relations. This means a parent with a date more recent than its child will appear before its child. git log has options --date-order and --author-date-order both of which show no parents before all its children, before ordering commits by date.

If sorted by commit time, a graph may have to draw a parent before its child. This is confusing to the user and require extra memory for the graph render algorithm. Topology order makes graph visualisation much simpler as all children are now visited before their parents.

This Pull Request prepares a PR for issue #81. It is relevant to both PR #2628 and PR #2890.

It changes the following:

  • Commits was ordered by commit time, but are now in topology order.

I followed the checklist:

  • I added unittests
  • I ran make check without errors
  • I tested the overall application
  • I added an appropriate item to the changelog

This is preparation for a graph implementation.

If sorted by commit time, a graph may have to draw a parent before
its child. This is confusing to the user and require extra memory
for the graph render algorithm.
@peso peso marked this pull request as draft July 9, 2026 05:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant