Use JGitUtil.isEmpty() to check whether repository is empty.