GitNotebookRepo extends VFSNotebookRepo implements NotebookRepoVersioned { Git getGit() { return git; } GitNotebookRepo(ZeppelinConfiguration conf); @Override synchronized void save(Note note); @Override Note get(String noteId, String rev); @Override List<Rev> history(String noteId); @Override void close();  }
@Test public void initNonemptyNotebookDir() throws IOException, GitAPIException { File dotGit = new File(Joiner.on(File.separator).join(notebooksDir, ".git")); assertThat(dotGit.exists()).isEqualTo(false); notebookRepo = new GitNotebookRepo(conf); Git git = notebookRepo.getGit(); assertThat(git).isNotNull(); assertThat(dotGit.exists()).isEqualTo(true); assertThat(notebookRepo.list()).isNotEmpty(); List<DiffEntry> diff = git.diff().call(); assertThat(diff).isEmpty(); }