WorkTreeUpdater: rename metadata maps
Change-Id: I8ff3803da8fc13377d11c2dc5523e9e32d0650cb
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/WorkTreeUpdater.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/WorkTreeUpdater.java
index a9f56c2..e5de2b4 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/util/WorkTreeUpdater.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/WorkTreeUpdater.java
@@ -160,12 +160,12 @@ public List<String> getModifiedFiles() {
/**
* Keeps {@link CheckoutMetadata} for {@link #checkout()}.
*/
- private Map<String, CheckoutMetadata> checkoutMetadata;
+ private Map<String, CheckoutMetadata> checkoutMetadataByPath;
/**
* Keeps {@link CheckoutMetadata} for {@link #revertModifiedFiles()}.
*/
- private Map<String, CheckoutMetadata> cleanupMetadata;
+ private Map<String, CheckoutMetadata> cleanupMetadataByPath;
/**
* Whether the changes were successfully written.
@@ -189,8 +189,8 @@ private WorkTreeUpdater(Repository repo, DirCache dirCache) {
Config config = repo.getConfig();
this.workingTreeOptions = config.get(WorkingTreeOptions.KEY);
this.inCoreFileSizeLimit = getInCoreFileSizeLimit(config);
- this.checkoutMetadata = new HashMap<>();
- this.cleanupMetadata = new HashMap<>();
+ this.checkoutMetadataByPath = new HashMap<>();
+ this.cleanupMetadataByPath = new HashMap<>();
}
/**
@@ -434,9 +434,9 @@ public void addToCheckout(String path, DirCacheEntry entry,
// In some cases, we just want to add the metadata.
toBeCheckedOut.put(path, entry);
}
- addCheckoutMetadata(cleanupMetadata, path, cleanupStreamType,
+ addCheckoutMetadata(cleanupMetadataByPath, path, cleanupStreamType,
cleanupSmudgeCommand);
- addCheckoutMetadata(checkoutMetadata, path, checkoutStreamType,
+ addCheckoutMetadata(checkoutMetadataByPath, path, checkoutStreamType,
checkoutSmudgeCommand);
}
@@ -472,7 +472,7 @@ public void deleteFile(String path, File file, EolStreamType streamType,
String smudgeCommand) {
toBeDeleted.put(path, file);
if (file != null && file.isFile()) {
- addCheckoutMetadata(cleanupMetadata, path, streamType,
+ addCheckoutMetadata(cleanupMetadataByPath, path, streamType,
smudgeCommand);
}
}
@@ -558,7 +558,7 @@ private void checkout() throws NoWorkTreeException, IOException {
.mkdirs();
} else {
DirCacheCheckout.checkoutEntry(repo, dirCacheEntry, reader,
- false, checkoutMetadata.get(entry.getKey()),
+ false, checkoutMetadataByPath.get(entry.getKey()),
workingTreeOptions);
result.modifiedFiles.add(entry.getKey());
}
@@ -586,7 +586,7 @@ public void revertModifiedFiles() throws IOException {
DirCacheEntry entry = dirCache.getEntry(path);
if (entry != null) {
DirCacheCheckout.checkoutEntry(repo, entry, reader, false,
- cleanupMetadata.get(path), workingTreeOptions);
+ cleanupMetadataByPath.get(path), workingTreeOptions);
}
}
}
@@ -761,4 +761,4 @@ private Repository nonNullRepo() throws NullPointerException {
return Objects.requireNonNull(repo,
() -> JGitText.get().repositoryIsRequired);
}
-}
\ No newline at end of file
+}