Commit e5fc428ecf3b23ed6b1a640bbddff9a59b251969 broke for linux-2.6 repository
for example, so we make a little bit more effort in handling weird e-mail
addresses. The linux-2.6 repository contains quite a few of these, some can be
found with the following command:
git rev-list --pretty=format:"%H %an <%aE>" HEAD | grep -v ^commit |grep -v '@'
commits_frac was used in date_first's place in f.write and, thus, completely
wrong in the resulting HTML report.
Signed-off-by: Heikki Hokkanen <hoxu@users.sf.net>
Commits in projects with lots of activity and authors don't happen
chronologically (patches are accepted later etc), so the counting was messed up
for them (git.git for example).
Search '/usr/share/gitstats/' for static files as well.
The first path to be searched is the directory of the binary, then
/usr/share/gitstats/. This is so that you can have both a "global" gitstats
version and a user-specific checkout installed, and the static files should be
taken from the matching place.
This change is done in preparation for Debian packaging.
Vincent Fourmond <fourmond@debian.org> is planning to package gitstats for
debian (RFP #440392).
Count lines using git objects instead of filesystem.
This seemed to be roughly three times slower than a direct "wc -l" from working
tree, but this way we are not limited to full & clean working trees, but can
also handle bare repositories.
A simple assumption is made about the tags: it's assumed that they come in
chronological order, and share the same history (eg. v0.0.1, v0.0.2). That way,
to get commits made for v0.0.2, we simply look for history from v0.0.1 to
v0.0.2.