You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While working on the new graphing code (#144), I noticed that there are some situations in which the commits are not listed in the order I would expect. Specifically, if the timestamp of a parent commit is later than a child commit (which could easily happen if the two commits were done on different machines with different clock settings), then the parent commit could be displayed above the child commit. This breaks a fundamental expectation in the graph code logic.
The easy fix is to just assume (or force) --topo-order and optionally also accept --date-order when graph rendering is enabled. The --topo-order flag was removed by default because it slows down rendering on large repos.
I think that the debian bug is more of a reference to the way branches and merges are drawn. We discussed this a bit during the rewrite, around here: #144 (comment)
Regarding this ticket, setting topo-order does indeed fix it. If that is what git-log does by default (and I'm fairly sure other tools like gitk do as well) then perhaps it makes sense for tig to do the same.
While working on the new graphing code (#144), I noticed that there are some situations in which the commits are not listed in the order I would expect. Specifically, if the timestamp of a parent commit is later than a child commit (which could easily happen if the two commits were done on different machines with different clock settings), then the parent commit could be displayed above the child commit. This breaks a fundamental expectation in the graph code logic.
I made a simple example repository to highlight this condition: https://github.com/BenBergman/tig-commit-order-edge-case
Using the current tip of my
fix-graph
branch (BenBergman/tig@dd7c263)Looking at the man page for git log, it seems the
--date-order
flag fixes the issue.I tried adding
--date-arder
to every instance of"log"
I could find in tig.c, but this didn't seem to help.I've not rebased onto master in a while, so I will try that soon.
The text was updated successfully, but these errors were encountered: