gitstats: Optimizations to the 'belongs to' metric
commit6b078fa0fcb5f98360850d2499e979bd25a356e2
authorSverre Rabbelier <sverre@rabbelier.nl>
Sun, 6 Jul 2008 21:19:43 +0000 (6 23:19 +0200)
committerSverre Rabbelier <sverre@rabbelier.nl>
Sun, 6 Jul 2008 21:30:21 +0000 (6 23:30 +0200)
treedeb281565e506cfaf01ddb04f61664a021c055c7
parent6eab7888b327ff78b59999fd4a2b35a986cee754
gitstats: Optimizations to the 'belongs to' metric

On the git.git repository there are a lot of 'strange' tree
structures, in which the same commits are often refered to
by multiple different other commits. As a result, if we do
not take measures against this, a lot of the same history
is checked multiple times. Especially in the git.git repo
this means the algorithm takes an insanely long amount of
time to finish. This commit introduces a 'memory' that
stores which commits have already been checked, and as such
should not be checked again.
To help debugging the information printed when the '-d'
flag is specified has been increased, the '-d' flag now
doubles as a '--verbose' flag. Not only debug information
is printed, but also information on which branch is
currently being examined.
src/git_stats/branch.py