|
34 | 34 | import java.util.Set;
|
35 | 35 | import java.util.function.Supplier;
|
36 | 36 | import java.util.stream.Collectors;
|
37 |
| -import java.util.stream.Stream; |
38 | 37 |
|
39 | 38 | import javax.annotation.Nullable;
|
40 | 39 |
|
@@ -134,24 +133,18 @@ public String endingFor(File file) {
|
134 | 133 | }
|
135 | 134 | }
|
136 | 135 |
|
137 |
| - @SuppressFBWarnings("SE_TRANSIENT_FIELD_NOT_RESTORED") |
138 |
| - static class FileState implements Serializable { |
139 |
| - private static final long serialVersionUID = 1L; |
140 |
| - |
| 136 | + static class FileState { |
141 | 137 | /** /etc/gitconfig (system-global), ~/.gitconfig, project/.git/config (each might-not exist). */
|
142 |
| - transient final FileBasedConfig systemConfig, userConfig, repoConfig; |
| 138 | + final FileBasedConfig systemConfig, userConfig, repoConfig; |
143 | 139 |
|
144 | 140 | /** Global .gitattributes file pointed at by systemConfig or userConfig, and the file in the repo. */
|
145 |
| - transient final @Nullable File globalAttributesFile, repoAttributesFile; |
| 141 | + final @Nullable File globalAttributesFile, repoAttributesFile; |
146 | 142 |
|
147 | 143 | /** git worktree root, might not exist if we're not in a git repo. */
|
148 |
| - transient final @Nullable File workTree; |
| 144 | + final @Nullable File workTree; |
149 | 145 |
|
150 | 146 | /** All the .gitattributes files in the work tree that we're formatting. */
|
151 |
| - transient final List<File> gitattributes; |
152 |
| - |
153 |
| - /** The signature of *all* of the files below. */ |
154 |
| - final FileSignature signature; |
| 147 | + final List<File> gitattributes; |
155 | 148 |
|
156 | 149 | @SuppressFBWarnings("SIC_INNER_SHOULD_BE_STATIC_ANON")
|
157 | 150 | FileState(File projectDir, Iterable<File> toFormat) throws IOException {
|
@@ -208,14 +201,6 @@ public boolean isOutdated() {
|
208 | 201 |
|
209 | 202 | // The .gitattributes files which apply to the files we are formatting
|
210 | 203 | gitattributes = gitAttributes(toFormat);
|
211 |
| - |
212 |
| - // find every actual File which exists above |
213 |
| - Stream<File> misc = Stream.of(systemConfig.getFile(), userConfig.getFile(), repoConfig.getFile(), globalAttributesFile, repoAttributesFile); |
214 |
| - List<File> toSign = Stream.concat(gitattributes.stream(), misc) |
215 |
| - .filter(file -> file != null && file.exists() && file.isFile()) |
216 |
| - .collect(Collectors.toList()); |
217 |
| - // sign it for up-to-date checking |
218 |
| - signature = FileSignature.signAsSet(toSign); |
219 | 204 | }
|
220 | 205 |
|
221 | 206 | /** Returns all of the .gitattributes files which affect the given files. */
|
|
0 commit comments