GitNotebookRepo extends VFSNotebookRepo { Git getGit() { return git; } GitNotebookRepo(ZeppelinConfiguration conf); @Override synchronized void save(Note note, AuthenticationInfo subject); @Override Revision checkpoint(String pattern, String commitMessage, AuthenticationInfo subject); @Override Note get(String noteId, Revision rev, AuthenticationInfo subject); @Override List<Revision> revisionHistory(String noteId, AuthenticationInfo subject); @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(null)).isNotEmpty(); List<DiffEntry> diff = git.diff().call(); assertThat(diff).isNotEmpty(); }