-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gitk: Implement date mode in the new framework
This restores date mode, which lists commits by date, as far as possible given the constraint that parents come after all their children. To implement this in the new framework, we (1) only join a new commit onto an existing arc if the arc is the last arc created, (2) treat arcs as seeds unless they have a child arc that comes later, and (3) never decrease the token value for an arc. This means we get lots of "seeds", which exposed some quadratic behaviour in adding and removing seeds. To fix this, we add a vbackptr array, which points to the arc whose vleftptr entry points to us, and a vlastins array, which shows where in an arc's vdownptr/vleftptr list we last inserted a parent, which acts as a hint of a good place to start looking for where to insert a new child. This also ensures the children array elements stay in sorted order at all times. We weren't resorting the children lists when reassigning tokens in renumbervarc. Since the children lists are now always sorted, we don't have to search through all elements to find the one with the highest token; we can just use the last element. Signed-off-by: Paul Mackerras <paulus@samba.org>
- Loading branch information
Paul Mackerras
committed
Dec 19, 2007
1 parent
24f7a66
commit f3ea5ed
Showing
1 changed file
with
130 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters