}
private static File createSampleGitRepo() throws IOException, GitAPIException {
try (Repository repository = CookbookHelper.createNewRepository()) {
System.out.println("Temporary repository at " + repository.getDirectory());
File myfile = new File(repository.getDirectory().getParent(), "testfile");
<BUG>myfile.createNewFile();

try (Git git = new Git(repository)) {</BUG>
git.add()
.addFilepattern("testfile")

}
}
private static File createSampleGitRepo() throws IOException, GitAPIException {
try (Repository repository = CookbookHelper.createNewRepository()) {
System.out.println("Temporary repository at " + repository.getDirectory());
File myfile = new File(repository.getDirectory().getParent(), "testfile");
if(!myfile.createNewFile()) {
throw new IOException("Could not create file " + myfile);
}
try (Git git = new Git(repository)) {
git.add()
.addFilepattern("testfile")
