GitCommandResult (@NotNull GitRepository repository, @NotNull String branchName) { final GitLineHandler h = new GitLineHandler(repository.getProject(), repository.getRoot(), GitCommand.REV_LIST); h.addParameters("-1"); h.addParameters(branchName); return runCommand(h); }