Patch Set 1: I would prefer that you didn't submit this

I would suggest to do the real work in a command in org.eclipse.jgit/src/org/eclipse/jgit/api. Your implementation in pgm should just reuse that command.

Problem is that your "git cat-file" functionality is not reuseable from other parts (jgit-test, egit, ...) because it's hardcoded command-line. And I can imagine a lot of use-cases for cat-file in e.g. our tests.

You can just look at http://egit.eclipse.org/w/?p=jgit.git;a=blob;f=org.eclipse.jgit/src/org/eclipse/jgit/api/LogCommand.java or ask me for questions about our commands.