<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><htmlxmlns="http://www.w3.org/1999/xhtml"><head><metahttp-equiv="Content-Type"content="text/html; charset=UTF-8"/><title>gitinspector</title><linkrel="stylesheet"type="text/css"href="docbook-xsl.css"/><metaname="generator"content="DocBook XSL Stylesheets V1.78.1"/></head><body><divxml:lang="en"class="refentry"lang="en"><aid="idp50966688"></a><divclass="titlepage"></div><divclass="refnamediv"><h2>Name</h2><p>gitinspector — statistical analysis tool for git repositories</p></div><divclass="refsynopsisdiv"><aid="_synopsis"></a><h2>Synopsis</h2><p><spanclass="strong"><strong>gitinspector</strong></span> [OPTION]… [REPOSITORY]</p></div><divclass="refsect1"><aid="_description"></a><h2>DESCRIPTION</h2><p>Analyze and gather statistics about a git repository. The defaut analysis shows general statistics per author, which can be complemented with a timeline analysis that shows the workload and activity of each author. Under normal operation, gitinspector filters the results to only show statistics about a number of given extensions and by default only includes source files in the statistical analysis.</p><p>Several output formats are supported, including plain text, HTML and XML.</p></div><divclass="refsect1"><aid="_options"></a><h2>OPTIONS</h2><p>List information about the repository in REPOSITORY. If no repository is specified, the current directory is used. If multiple repositories are given, information will be fetched from the last repository specified.</p><p>Mandatory arguments to long options are mandatory for short options too. Boolean arguments can only be given to long options.</p><divclass="variablelist"><dlclass="variablelist"><dt><spanclass="term">
A comma separated list of file extensions to include when computing statistics. The default extensions used are: java,c,cc,cpp,h,hh,hpp,py,glsl,rb,js,sql. Specifying a single <spanclass="emphasis"><em>*</em></span> asterisk character includes files with no extension. Specifying two consecutive <spanclass="emphasis"><em>**</em></span> asterisk characters includes all files regardless of extension.
Defines in which format output should be generated; the default format is <spanclass="emphasis"><em>text</em></span> and the available formats are: html,htmlembedded,text,xml (see <aclass="link"href="#X1"title="OUTPUT FORMATS"><spanclass="strong"><strong>OUTPUT FORMATS</strong></span></a>)
Show statistics and information in a way that is formatted for grading of student projects; this is the same as supplying the options <spanclass="strong"><strong>-HlmrTw</strong></span>
An exclusion pattern describing the file paths, revisions, author names or author emails that should be excluded from the statistics; can be specified multiple times (see <aclass="link"href="#X2"title="FILTERING"><spanclass="strong"><strong>FILTERING</strong></span></a>)
</dd></dl></div></div><divclass="refsect1"><aid="X1"></a><h2>OUTPUT FORMATS</h2><p>There are support for multiple output formats in gitinspector. They can be selected using the <spanclass="strong"><strong>-F</strong></span>/<spanclass="strong"><strong>--format</strong></span> flags when running the main gitinspector script.</p><divclass="variablelist"><dlclass="variablelist"><dt><spanclass="term">
Plain text with some very simple ANSI formatting, suitable for console output. This is the format chosen by default by gitinspector.
</dd><dt><spanclass="term">
<spanclass="strong"><strong>html</strong></span>
</span></dt><dd>
HTML with external links. The generated HTML page links to some external resources; such as the JavaScript library JQuery. It requires an active internet connection to properly function. This output format will most likely also link to additional external resources in the future.
HTML with no external links. Similar to the HTML output format, but requires no active internet connection. As a consequence; the generated pages are bigger (as certain scripts have to be embedded into the generated output).
</dd><dt><spanclass="term">
<spanclass="strong"><strong>xml</strong></span>
</span></dt><dd>
XML suitable for machine consumption. If you want to parse the output generated by gitinspector in a script or application of your own; this is the format you should choose.
</dd></dl></div></div><divclass="refsect1"><aid="X2"></a><h2>FILTERING</h2><p>gitinspector offers several different ways of filtering out unwanted information from the generated statistics:</p><divclass="itemizedlist"><ulclass="itemizedlist"style="list-style-type: disc; "><liclass="listitem">
<spanclass="strong"><strong>gitinspector -x myfile</strong></span>, filter out and exclude statistics from all files (or paths) with the string "myfile"
</li><liclass="listitem">
<spanclass="strong"><strong>gitinspector -x file:myfile</strong></span>, filter out and exclude statistics from all files (or paths) with the string "myfile"
</li><liclass="listitem">
<spanclass="strong"><strong>gitinspector -x author:John</strong></span>, filter out and exclude statistics from all authors containing the string "John"
</li><liclass="listitem">
<spanclass="strong"><strong>gitinspector -x email:@gmail.com</strong></span>, filter out and exclude statistics from all authors with a gmail account
</li><liclass="listitem">
<spanclass="strong"><strong>gitinspector -x revision:8755fb33</strong></span>, filter out and exclude statistics from all revisions containing the hash "8755fb33"
<spanclass="strong"><strong>gitinspector -x message:BUGFIX</strong></span>, filter out and exclude statistics from all revisions containing "BUGFIX" in the commit message.
</li></ul></div><p>The gitinspector command also lets you add multiple filtering rules by simply specifying the -x options several times or by separating each filtering rule with a comma;</p><divclass="itemizedlist"><ulclass="itemizedlist"style="list-style-type: disc; "><liclass="listitem">
</li></ul></div><p>Sometimes, sub-string matching (as described above) is simply not enough. Therefore, gitinspector let’s you specify regular expressions as filtering rules. This makes filtering much more flexible:</p><divclass="itemizedlist"><ulclass="itemizedlist"style="list-style-type: disc; "><liclass="listitem">
<spanclass="strong"><strong>gitinspector -x "author:\^(?!(John Smith))"</strong></span>, only show statistics from author "John Smith"
</li><liclass="listitem">
<spanclass="strong"><strong>gitinspector -x "author:\^(?!([A-C]))"</strong></span>, only show statistics from authors starting with the letters A/B/C
</li><liclass="listitem">
<spanclass="strong"><strong>gitinspector -x "email:.com$"</strong></span>, filter out statistics from all email addresses ending with ".com"
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.</p></div><divclass="refsect1"><aid="_see_also"></a><h2>SEE ALSO</h2><p><spanclass="strong"><strong>git</strong></span>(1)</p></div></div></body></html>