From 1ed5382b37453309580e11a11cf4c3bb134813fa Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Thu, 14 Jan 2016 14:59:55 +0900 Subject: [PATCH] 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 --- org.eclipse.jgit/src/org/eclipse/jgit/api/CommitCommand.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/CommitCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/CommitCommand.java index 9466dab74..6828ed338 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/CommitCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/CommitCommand.java @@ -179,7 +179,7 @@ public class CommitCommand extends GitCommand { 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$