9daecc53aac0cd7a18920f8a8721e468994dd92a
[git-stats.git] / doc / commit.txt
blob9daecc53aac0cd7a18920f8a8721e468994dd92a
1 syntax: stats.py commit <options>
3 The purpose of the commit module is to gather statistics
4 about commits, or related to commits, with the exception
5 of things related to diffs (only retrieving the raw diff is
6 in this module).
8 Currently the available metrics in the author module are
9 the following:
10 * Find all the commits that touched the same paths as the
11   specified commit. This is implemented by passing the
12   result of the 'paths touched' auxillary function to the
13   'commits that touched' auxillary function. See below.
15 * Retrieve the diff of a commit, either with or without
16   context, and optionally ignoring whitespace changes. This
17   method also works for the root commit (by making use of
18   the '--root' option to 'diff tree'.
20 * Show only commits of which the commit message, and/or the
21   commit diff, match a specific regexp.  This is a simple
22   reimplementation of 'git log -S' and 'git log --grep'. It
23   is preferable to instead use the options native to
24   'git log', than to use this slower version.
25   Note: the regexps for the 'commit message' and the
26   'commit diff' may be different.
28 It also defines the following auxillary functions:
29 * Print a commit in a 'readable' way, this is by default
30   'git log -1 --name-only'. By the way of an environmental
31   variable ('GIT_STATS_PRETTY_PRINT'), it can be made to
32   instead use 'git log -1 --prety=oneline' by setting the
33   variable to 'online'.
35 * Retrieve all the paths that a specific commit touches,
36   this is used internally to limit the commits that have
37   to be searched when looking for a merge. That is done by
38   passing the output of this method to the one described
39   below.
41 * Find all commits that touched a list of files, optionally
42   treating the paths as relative to the current working
43   directory.