How to use lookatgit

Overview
The 'lookatgit' program parses git repositories for information about who committed what, how much, when, what was removed, and what the impact of all this has been on the repository.

The upstream for 'lookatgit' is at http://github.com/mpdehaan/lookatgit.

It is written in Scala, compiled by the  compiler that uses a Java runtime.

The Scala code wraps a few 'git' commands (git show, git log), then processes the output. Any language good at text processing could be used; the original author was playing with a new language while solving a new problem.

The Scala compiler 'scalac' builds the *.scala files in to a multiple *.class files.

The Scala runtime, 'scala', uses the configured JVM.

How to obtain and install
These instructions recommend cloning the git repository and working from a local clone. You can obtain a tarball or zip file, if you wish. The effect is the same, but the  allows you to interact with the upstream if you need.


 * 1) Obtain the 'lookatgit' source code:
 * 2) * If use github.com, you can use the fork command to make your own fork within github.com. The use the clone command on your own fork, instead of the main upstream tree:
 * 3) Install the scala and java-1.6.0-openjdk packages:
 * 4) * The 'lookatgit' README says to use the Scala upstream release directly. The   for 'lookatgit' is hard-coded to seek the Scala binaries on that path.  If you choose to follow this method, do not make changes to the.
 * 5) Edit the  .  Below is what the Makefile looks like in the upstream source.  Change the path to the Scala compiler to   and the Scala runtime to
 * 6) Edit the   to include a new target for your chosen git repository.  The git repository must exist locally:
 * 7) Edit   to include this target:
 * 8) * example:
 * 9) * 	/usr/bin/scala -classpath . App ~/git/example
 * 10) Compile the Scala code into class files:
 * 11) Run the application on the git repository:
 * 1) Compile the Scala code into class files:
 * 2) Run the application on the git repository:

Makefile
Here is what the upstream  looks like in release:

all:	compile

compile: /opt/scala/bin/scalac -classpath. -sourcepath. *.scala

test: /opt/scala/bin/scala -classpath. App ~/cg/lookat

test2: /opt/scala/bin/scala -classpath. App ~/cg/_cobbler

test3: /opt/scala/bin/scala -classpath. App ~/cg/func

clean: rm *.class

Making it work
Ideally, add a  to the makefile that points at a codebase that you have cloned locally, then run the build:

make compile new-target

Problems

 * Make sure you are running the latest Scala from upstream, even if it means using the tarball and putting it at.
 * Fedora 11 or later? It's suppose to work on those platforms.

Solutions
System.err.println("Processing " + commit_ttl + " commits, this may take a while...")
 * Adding debug and print commands:  and.
 * For instance, in the code:
 * Some tips from 'lookatgit' original author:
 * It is likely hung somehow.  The code is executing things via Runtime.getRuntime ... a side effect of Scala using the JVM is it is bad at executing processes. There is a requirement to consume pending input or it will hang.