|
1 | 1 | /* |
2 | | - * Copyright 2020-2021 DiffPlug |
| 2 | + * Copyright 2020-2022 DiffPlug |
3 | 3 | * |
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
5 | 5 | * you may not use this file except in compliance with the License. |
@@ -138,7 +138,7 @@ private static boolean worktreeIsCleanCheckout(TreeWalk treeWalk) { |
138 | 138 | private final static int WORKDIR = 2; |
139 | 139 |
|
140 | 140 | Map<Project, Repository> gitRoots = new HashMap<>(); |
141 | | - Map<File, Repository> gitRepositories = new HashMap<>(); |
| 141 | + Map<File, Repository> gitRepositories = new HashMap<>(); |
142 | 142 | Table<Repository, String, ObjectId> rootTreeShaCache = HashBasedTable.create(); |
143 | 143 | Map<Project, ObjectId> subtreeShaCache = new HashMap<>(); |
144 | 144 |
|
@@ -192,13 +192,13 @@ private static boolean isGitRoot(File dir) { |
192 | 192 | } |
193 | 193 |
|
194 | 194 | Repository createRepo(File dir) throws IOException { |
195 | | - File dotGitDir = GitWorkarounds.getDotGitDir(dir); |
196 | | - Repository repo = gitRepositories.get(dotGitDir); |
197 | | - if (repo == null) { |
198 | | - repo = FileRepositoryBuilder.create(dotGitDir); |
199 | | - gitRepositories.put(dotGitDir, repo); |
200 | | - } |
201 | | - return repo; |
| 195 | + File dotGitDir = GitWorkarounds.getDotGitDir(dir); |
| 196 | + Repository repo = gitRepositories.get(dotGitDir); |
| 197 | + if (repo == null) { |
| 198 | + repo = FileRepositoryBuilder.create(dotGitDir); |
| 199 | + gitRepositories.put(dotGitDir, repo); |
| 200 | + } |
| 201 | + return repo; |
202 | 202 | } |
203 | 203 |
|
204 | 204 | /** |
|
0 commit comments