protected Git setupGit() throws IOException, GitAPIException { return setupGit( createTempDirectory() ); }
protected Git setupGit( final File tempDir ) throws IOException, GitAPIException { final Git git = Git.init().setBare( true ).setDirectory( tempDir ).call(); commit( git, "master", "name", "name@example.com", "cool1", null, null, false, new HashMap<String, File>() {{ put( "file1.txt", tempFile( "content" ) ); put( "file2.txt", tempFile( "content2" ) ); }} ); return git; }