From Fedora Project Wiki

Revision as of 11:28, 13 November 2009 by Quaid (talk | contribs) (adding how to make it work section, needs help to get it to work)


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

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

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 git clone allows you to interact with the upstream if you need.

  1. Obtain the 'lookatgit' source code: git clone git://
    • If use, you can use the fork command to make your own fork within The use the clone command on your own fork, instead of the main upstream tree: git clone git://
  2. Install the scala and java-1.6.0-openjdk packages: sudo yum install scala java-1.6.0-openjdk
    • The 'lookatgit' README says to use the Scala upstream release directly. The Makefile 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 Makefile.
  3. Edit the /path/to/src/lookatgit/Makefile. Below is what the Makefile looks like in the upstream source. Change the path to the Scala compiler to /usr/bin/scalac and the Scala runtime to /usr/bin/scala
  4. Edit the Makefile to include a new target for your chosen git repository. The git repository must exist locally:
    1. cd ~/git/
    2. git clone git://
    3. Edit Makefile to include this target:
      • example:
      • 	/usr/bin/scala -classpath . App ~/git/example
  5. Compile the Scala code into class files: make compile
  6. Run the application on the git repository: make example


Here is what the upstream Makefile looks like in release:

all:	compile

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

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

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

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

	rm *.class

Making it work

Ideally, add a new-target to the makefile that points at a codebase that you have cloned locally, then run the build:

make compile new-target


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


  • Adding debug and print commands: System.out.println and System.err.println.
    • For instance, in the code:
System.err.println("Processing " + commit_ttl + " commits, this may take a while...")
  • 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.