294 Commits

Author SHA1 Message Date
Craig R. Hughes
55c5c28555 Quotes around date and commit range to allow spaces in those fields; eg "5 months ago" for a date
Signed-off-by: Heikki Hokkanen <hoxu@users.sf.net>
2016-01-08 19:12:21 +02:00
Stephan Kuschel
e35fea2b9a use python2 enviroment
On systems like Arch Linux `python` defaults to `python3` preventing
gitstats to start. This fixes it.

Signed-off-by: Heikki Hokkanen <hoxu@users.sf.net>

[hoxu@users.sf.net: Debian Jessie and CentOS 6.5 have /usr/bin/python2,
but OS X Yosemite only has /usr/bin/python2.7. There does not seem to be
a portable way to refer to python 2.x, so unfortunately on some
platforms the shebang needs to be modified manually]
2015-08-16 09:42:45 +03:00
Stephen Gordon
fe94d55836 Copy configured style file to target
When generating HTML output with a custom stylesheet specified using
-c style='mystyle.css' the CSS file specified was not being copied to
the target directory.

Signed-off-by: Heikki Hokkanen <hoxu@users.sf.net>
2014-12-25 10:23:32 +02:00
Heikki Hokkanen
c2310a8bf3 Change manpage repository address to github. 2014-11-07 19:06:14 +02:00
Andrew Lazarus
caff4d7d18 Fix Makefile make man to work w/o .git
Signed-off-by: Heikki Hokkanen <hoxu@users.sf.net>
2014-11-07 18:53:27 +02:00
Diomidis Spinellis
eb812a450d Correct splitting of git-ls-tree output
Split limit 5 was off by one, which resulted in incorrect
processing of file paths with spaces embedded in them.
New split limit of 4 gets the required parts, because it
specifies the allowed number of splits, not elements:

mode type hash size name
    1    2    3    4

Signed-off-by: Heikki Hokkanen <hoxu@users.sf.net>
2014-11-07 18:47:39 +02:00
Heikki Hokkanen
6950247722 Add missing alt text for img. 2014-11-07 18:40:02 +02:00
Heikki Hokkanen
3a4ea58fd3 Move </tr> to right place. 2014-11-07 18:38:12 +02:00
Heikki Hokkanen
f281bee40a Use id-based fragment identifiers.
a name is deprecated.
2014-11-07 18:34:41 +02:00
Heikki Hokkanen
107ada370a Generate html5, not xhtml. 2014-11-07 18:30:29 +02:00
Heikki Hokkanen
36bddf958d Add missing xhtml end tag. 2014-11-07 18:18:40 +02:00
Jani Hur
5dd38fabfe Added HTML header meta tag so that author names will be shown correctly also when the file is opened in a browser.
Signed-off-by: Heikki Hokkanen <hoxu@users.sf.net>
2014-11-07 18:16:19 +02:00
Jani Hur
a5a9b09f39 Removed useless merge_authors configuration option. Use .mailmap instead.
Signed-off-by: Heikki Hokkanen <hoxu@users.sf.net>
2014-09-13 10:00:04 +03:00
Jani Hur
0e06856b98 How to merge author information.
Signed-off-by: Heikki Hokkanen <hoxu@users.sf.net>
2014-09-13 10:00:04 +03:00
Heikki Hokkanen
6d39c9fbe9 Document start_date option on the manpage. 2014-06-17 18:42:21 +03:00
Sylvain Joyeux
780c0fd57e implement a way to limit the statistics to commits after a start date
This is really useful when computing statistics over a set of
repositories, where some repositories are much older than other.

Signed-off-by: Heikki Hokkanen <hoxu@users.sf.net>
2014-06-17 18:29:32 +03:00
Sylvain Joyeux
e56e7b6f91 properly terminate created subprocesses
This fixes a memory / ressource leak that manifests when computing
stats over big sets of repositories. It was eating more than 8G of
memory for ~15 git repositories.

Signed-off-by: Heikki Hokkanen <hoxu@users.sf.net>
2014-06-17 18:10:15 +03:00
Heikki Hokkanen
25dcacd399 Fix indentation to be consistent. 2014-06-03 20:20:59 +03:00
Jan Pieper
6e9828c2a8 Go back to previous dir to no fail on relative paths
Signed-off-by: Heikki Hokkanen <hoxu@users.sf.net>
2014-06-03 19:27:03 +03:00
Heikki Hokkanen
a22f20c7db Bump copyright year. 2014-03-29 14:59:06 +02:00
Richard Russon (flatcap)
15041086e6 Y-Axis of graphs start at zero
Fix the base of graph y-axes at zero to prevent misleading graphics.

Signed-off-by: Heikki Hokkanen <hoxu@users.sf.net>
2014-03-29 14:57:13 +02:00
Andreas Motl
a266ddc1cc fix: let "Pool" for line count data collection honor "processes" configuration setting
Signed-off-by: Heikki Hokkanen <hoxu@users.sf.net>
2013-12-21 15:38:03 +02:00
Heikki Hokkanen
fc9b04ffea Bump README python requirement to 2.6.0.
The code already checks for python 2.6.
2013-12-21 15:13:51 +02:00
Heikki Hokkanen
5ba386aede Remove backticks from author names passed to gnuplot.
Without this, author names containing `touch /tmp/vulnerable` would cause said
file to appear after generating statistics for the given repository.

This is not an optimal solution. Instead of blacklisting characters we should
either whitelist some, or find a safe escape mechanism for gnuplot.
2013-12-21 15:04:04 +02:00
Alexander Strasser
a664c2eb6b Fix minor documentation issues
* author.txt was renamed to AUTHOR
* use git shortlog instead of git-shortlog
  because the latter is not necessarily in PATH

Signed-off-by: Heikki Hokkanen <hoxu@users.sf.net>
2013-09-29 10:20:52 +03:00
Heikki Hokkanen
c447e55a7a Make number of processes configurable.
Default to 8.
2013-07-29 17:42:36 +03:00
Andrey Devyatkin
8647c75d48 Fix performance issue for huge repositories
Problem: gitstats will read every commit and every file in repository in one
thread during initial statistics generation (i.e. no cache available). It may
take much time in case of huge repositories (100 000+ files) Solution: Execute
all read commands in 24 threads instead of one

Signed-off-by: Heikki Hokkanen <hoxu@users.sf.net>
2013-07-29 17:39:13 +03:00
Heikki Hokkanen
31ff072d23 Bump copyright year. 2013-07-26 22:25:00 +03:00
Heikki Hokkanen
a923085699 Refer to manual page in usage. 2013-07-23 17:42:29 +03:00
Stephen Gordon
09d4be558d Add support for -h/--help options.
RHBZ#962168. In response to user request added support for invoking with the -h
or --help argument to print usage information. Previously usage was only
printed if the user provided less than two arguments AND did not provide any
invalid arguments, as they were unhandled the commonly used -h and --help
arguments counted as invalid.

https://bugzilla.redhat.com/show_bug.cgi?id=962168

Signed-off-by: Heikki Hokkanen <hoxu@users.sf.net>
2013-07-23 17:39:46 +03:00
Sven van Haastregt
084303928c Add example invocations to documentation
Signed-off-by: Heikki Hokkanen <hoxu@users.sf.net>
2013-02-24 10:02:25 +02:00
Heikki Hokkanen
3405250939 Rename doc files to uppercase for consistency. 2013-02-24 09:48:33 +02:00
Heikki Hokkanen
0e059fc31c Mention sortable.js license (MIT) in doc/license.
Thanks-to: Stephen Gordon <stephen.a.gordon@gmail.com>
2013-02-24 09:48:27 +02:00
Ernesto Jiménez
aa77a8915f Fix total lines for multi-repository stats.
Make general stats total LOC show the total aggregate from all projects,
instead of the total LOC from last project.

[hoxu@users.sf.net: rewrote the commit message]

Signed-off-by: Heikki Hokkanen <hoxu@users.sf.net>
2013-01-31 19:25:43 +02:00
Heikki Hokkanen
19e687b96e Fix cachefile corruption when out of disk space.
Avoid corrupt cache by writing it to a temporary file first, and then
overwriting the original one. Should also fix other exceptional cases.

Thanks-to: Alexander Strasser <eclipse7@gmx.net>
2012-12-17 21:44:20 +02:00
Heikki Hokkanen
e6b3058337 Document linear_linestats and project_name options. 2012-07-19 13:08:15 +03:00
Ciaran Gultnieks
380b164bc5 Added ability to merge/rename authors
There's a new config field, 'merge_authors', which is a dictionary of
source name to target name. Whenever an author name matches a source
name it will be treated as if it was the target name instead.

Use this if authors have committed under multiple names, to squash their
statistics down to a single author. You can also use it to rename an
author for the purposes of the output.

Additionally, the -c option has been extended so for a dictionary option
you specify -c field=key,value. The key,value pair is then ADDED to the
dictionary.

Putting it all together in an example:

  ./gitstats -c merge_authors=bob,Bob\ Jones    \
      -c merge_authors=bob2,Bob\ Jones          \
      -c merge_authors=erica,Erica\ Smith ....

Signed-off-by: Heikki Hokkanen <hoxu@users.sf.net>
2012-07-19 11:57:47 +03:00
Heikki Hokkanen
09e324e3d1 Merge branch 'master' of https://github.com/svenvh/gitstats
Signed-off-by: Heikki Hokkanen <hoxu@users.sf.net>
2012-07-17 11:39:02 +03:00
Sven van Haastregt
8b475ea3e6 Fix incorrect gitstats version.
If the VERSION variable was not filled in, gitstats would run
'git rev-parse' on the repository being examined instead of the
gitstats repository.

Signed-off-by: Sven van Haastregt <svhaastr@liacs.nl>
2012-07-15 12:39:58 +02:00
Sven van Haastregt
a9b3f0f4fe Check for gnuplot before collecting data.
This should address issue:
Check for gnuplot before running - ID: 3062202
http://sourceforge.net/tracker/?func=detail&aid=3062202&group_id=203965&atid=987711

Signed-off-by: Sven van Haastregt <svhaastr@liacs.nl>
2012-07-14 23:07:00 +02:00
Sven van Haastregt
f562f98185 Report proper gnuplot version.
If a custom version of gnuplot would be used by setting the GNUPLOT
environment variable, then still the default gnuplot was called to fill
in the gnuplot version number.

Signed-off-by: Sven van Haastregt <svhaastr@liacs.nl>
2012-07-14 23:03:19 +02:00
Heikki Hokkanen
496228fb74 Remove "total_authors = 0" fallback.
When counting authors, do not fall back to 0 if the git call fails. Zero
authors causes ZeroDivisionError later on otherwise. This reverts an old change
for msysgit on win32, introduced in a01045f248.
It should no longer be necessary.
2012-07-13 21:42:05 +03:00
Heikki Hokkanen
2e1aba41e9 Catch ZeroDivisionError in file extension stats.
Otherwise it would not be possible to generate stats for binary-only
repositories.
2012-07-13 18:07:29 +03:00
Heikki Hokkanen
75b53209da Catch ZeroDivisionError in 'Average file size'. 2012-07-13 17:49:15 +03:00
Heikki Hokkanen
910d179c5f Bump copyright year. 2012-05-28 21:43:20 +03:00
Heikki Hokkanen
4438d41363 Set LC_ALL to 'C'.
Parsing of some git outputs relies on the english language being used, so
explicitly set the locale before running any of them.
2012-05-28 21:42:14 +03:00
Alexander Strasser
464bee6a11 Parse git's diff stat summary more flexibly.
Git versions with commit 7f814632f5d4d7af9f4225ece6039dbc44e03079 print the
stat summary output slightly different. There were two changes that affect
GitStats:

a) Singular forms of files/insertions/deletions may be used
b) The number of counts is now variable ranging from 1 to 3:
   1: only files changed if file count is 0
   2: if either insertions or deletions are 0 (not if both are)
   3: where files,insertions and deletions are >0
          or both insertions and deletions are  0

Signed-off-by: Heikki Hokkanen <hoxu@users.sf.net>
2012-05-28 21:27:40 +03:00
Alexander Strasser
4cce497e96 Calculate commit delta days with full days.
Make the units on par with active commit days. Previously a new project
committed to yesterday at 23:00 and today at 1:00 would have an age of 1 day
but 2 active days.

Signed-off-by: Heikki Hokkanen <hoxu@users.sf.net>
2012-05-25 20:19:32 +03:00
Thomas R. Koll
ad7efbb939 Fix commits per tag counting.
A hard-to-spot bug where the total number of commits for a tag was always set
to the number of commits that one of the commiters did and not the cumulated
sum over all commiters.

[hoxu@users.sf.net: created a commit from diff and description sent by Thomas]
2012-03-08 22:40:13 +02:00
Heikki Hokkanen
8aebc9ce66 Skip submodules when counting extensions and file sizes. 2011-11-20 09:50:28 +02:00