I\'m researching the idea of building a super-small (preferably PHP) web app, which will serve (among other things) as a minimal front-end to a git repository.
You may also want to check out the Cgit project since they've done something similar (except they build their own git library -- also to avoid running git directly).
There's JGit, a pure Java implementation, that may be useful to you.