}
@Test
public void startReleaseWithNewCommit() throws Exception
{
Git git = RepoUtil.createRepositoryWithMasterAndDevelop(newDir());
JGitFlowInitCommand initCommand = new JGitFlowInitCommand();
JGitFlow flow = initCommand.setDirectory(git.getRepository().getWorkTree()).call();
git.checkout().setName("develop").call();
//we should be on develop branch
assertEquals(flow.getDevelopBranchName(), git.getRepository().getBranch());
//create a new commit
File junkFile = new File(git.getRepository().getWorkTree(), "junk.txt");
FileUtils.writeStringToFile(junkFile, "I am junk");
git.add().addFilepattern(junkFile.getName()).call();
RevCommit commit = git.commit().setMessage("committing junk file").call();
//make sure develop has our commit
assertTrue(GitHelper.isMergedInto(git, commit, flow.getDevelopBranchName()));
flow.releaseStart("1.0").call();
assertEquals(flow.getReleaseBranchPrefix() + "1.0", git.getRepository().getBranch());
//the release branch should have our commit
assertTrue(GitHelper.isMergedInto(git, commit, flow.getReleaseBranchPrefix() + "1.0"));
}