gitk: Use git log without --topo-order and reorganize the commits ourselves
This very large patch implements code to organize the commits from
git log into "arcs" (sequences of commits where each pair of adjacent
commits are the only parent and child of each other), and orders the
arcs so as to get a topological ordering of the commits. This means
we can use git log without --topo-order and display the commits as we
get them, incrementally, which makes the cold-cache start up time much
faster, particularly on unpacked repos.
One beneficial effect of this is that the File->Update menu item now
just adds any new commits to the existing graph instead of rereading
the whole thing from scratch, which is much faster. (If you do want
to reread the whole graph from scratch you can use File->Reload.)
At an implementation level, this means that the displayorder and
parentlist lists are no longer fully valid at all times, and the
commitrow array has gone. New procedures commitinview and commitonrow
replace the commitrow array, and make_disporder ensures that
displayorder and parentlist are valid for a range of rows.
The overall time to load the kernel repository has gone up a bit, from
~9 seconds to ~11 seconds on my G5, but I think that is worth it given
that the time to get a window up with commits displayed in it has gone
from ~3 seconds to under 1 second.
Signed-off-by: Paul Mackerras <paulus@samba.org>