CommitCommand: Remove redundant null check

Repository.getWorkTree is annotated as @NonNull, so the check
for it returning null is redundant.

Change-Id: I597b0f774ff857b8900519f14a1a17a904cf7c6f
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
This commit is contained in:
David Pursehouse 2016-01-14 14:59:55 +09:00
parent d2044aed4f
commit 1ed5382b37
1 changed files with 1 additions and 1 deletions

View File

@ -179,7 +179,7 @@ public RevCommit call() throws GitAPIException, NoHeadException,
processOptions(state, rw);
if (all && !repo.isBare() && repo.getWorkTree() != null) {
if (all && !repo.isBare()) {
try (Git git = new Git(repo)) {
git.add()
.addFilepattern(".") //$NON-NLS-1$