diff options
author | David Pursehouse <david.pursehouse@sonymobile.com> | 2016-01-14 14:59:55 +0900 |
---|---|---|
committer | David Pursehouse <david.pursehouse@sonymobile.com> | 2016-01-14 15:04:34 +0900 |
commit | 1ed5382b37453309580e11a11cf4c3bb134813fa (patch) | |
tree | e666c3c79c9e8bcf23c2cb8026ad73014bcd1b1f /org.eclipse.jgit | |
parent | d2044aed4fc49bc5fe5053febe410b1aa6a95093 (diff) | |
download | jgit-1ed5382b37453309580e11a11cf4c3bb134813fa.tar.gz jgit-1ed5382b37453309580e11a11cf4c3bb134813fa.zip |
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>
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/api/CommitCommand.java | 2 |
1 files changed, 1 insertions, 1 deletions
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 9466dab74e..6828ed338f 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<RevCommit> { 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$ |