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

  git.branchCreate().setName("b1").call();
  git.checkout().setName("b1").call();
  createAndCommitFile("file-b1");
  Path worktree2 = temp.newFolder().toPath();
  Git.cloneRepository()
    .setURI(worktree.toString())
    .setDirectory(worktree2.toFile())
    .call();
  assertThat(newScmProvider().branchChangedFiles("master", worktree2))
    .containsOnly(worktree2.resolve("file-b1"));
  verifyZeroInteractions(analysisWarnings);
}