This will NPE unless the user passed --git-dir on the command line to us.  Which means this fails:

  mkdir foo
  cd foo
  jgit init

You need to instead do:

  Git git = command.call();
  out.println(.... git.getRepository().getDirectory().getAbsolutePath());