浏览代码

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>
tags/v4.2.0.201601211800-r
David Pursehouse 8 年前
父节点
当前提交
1ed5382b37
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1
    1
      org.eclipse.jgit/src/org/eclipse/jgit/api/CommitCommand.java

+ 1
- 1
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$

正在加载...
取消
保存