Skip to content

Commit 38ca03b

Browse files
committed
spotlessApply
1 parent f6f37f4 commit 38ca03b

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ spotless {
1818
trimTrailingWhitespace()
1919
endWithNewline()
2020
}
21-
}
21+
}

lib-extra/src/main/java/com/diffplug/spotless/extra/GitRatchet.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2020-2021 DiffPlug
2+
* Copyright 2020-2022 DiffPlug
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -138,7 +138,7 @@ private static boolean worktreeIsCleanCheckout(TreeWalk treeWalk) {
138138
private final static int WORKDIR = 2;
139139

140140
Map<Project, Repository> gitRoots = new HashMap<>();
141-
Map<File, Repository> gitRepositories = new HashMap<>();
141+
Map<File, Repository> gitRepositories = new HashMap<>();
142142
Table<Repository, String, ObjectId> rootTreeShaCache = HashBasedTable.create();
143143
Map<Project, ObjectId> subtreeShaCache = new HashMap<>();
144144

@@ -192,13 +192,13 @@ private static boolean isGitRoot(File dir) {
192192
}
193193

194194
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;
202202
}
203203

204204
/**

0 commit comments

Comments
 (0)