I am using the below code to clone a git repo from Java. I need to store the cloned latest revision hash.
localRepo = new FileRepository(path);
git = new Git(localRepo);
Git.cloneRepository().setURI(url).setBranch("master")
.setDirectory(new File(path)).call();
git.close();
Any clue on getting the revision hash here?