summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java14
1 files changed, 5 insertions, 9 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java
index a50132bc63..bbc5cc2a6a 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java
@@ -215,15 +215,11 @@ public class Repository {
}
if (workDir == null) {
- if (d != null) {
- // Only read core.worktree if GIT_DIR is set explicitly. See
- // git-config(1).
- String workTreeConfig = getConfig().getString("core", null, "worktree");
- if (workTreeConfig != null) {
- workDir = FS.resolve(d, workTreeConfig);
- } else {
- workDir = gitDir.getParentFile();
- }
+ String workTreeConfig = getConfig().getString("core", null, "worktree");
+ if (workTreeConfig != null) {
+ workDir = FS.resolve(d, workTreeConfig);
+ } else {
+ workDir = gitDir.getParentFile();
}
}