@Test
public void branchChangedFiles_should_not_crash_if_branches_have_no_common_ancestors() throws GitAPIException, IOException {

  String fileName = "file-in-first-commit.xoo";
  String renamedName = "file-renamed.xoo";
  git.checkout().setOrphan(true).setName("b1").call();
  Path file = worktree.resolve(fileName);
  Path renamed = file.resolveSibling(renamedName);
  addLineToFile(fileName, 1);
  Files.move(file, renamed);
  git.rm().addFilepattern(fileName).call();
  commit(renamedName);
  Set<Path> files = newScmProvider().branchChangedFiles("master", worktree);
  // no shared history, so no diff
  assertThat(files).isNull();
}