diff options
author | Luca Milanesio <luca.milanesio@gmail.com> | 2019-03-12 07:00:01 +0000 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2019-03-12 15:06:04 +0100 |
commit | 2d116cd0ab5f68613da8be4907460089c6f1fa22 (patch) | |
tree | cbb8662c73305800b6df910c2220a7bd1a5fc5ba /org.eclipse.jgit/src | |
parent | 2dc572df24c58ae8bf9019f7fd10459d3d53779d (diff) | |
download | jgit-2d116cd0ab5f68613da8be4907460089c6f1fa22.tar.gz jgit-2d116cd0ab5f68613da8be4907460089c6f1fa22.zip |
Use FileSnapshot to get lastModified on PackFile
Do not redundantly call File.lastModified() for extracting the
timestamp of the PackFile but rather use consistently the FileSnapshot
which reads all file attributes in a single bulk call.
Change-Id: I932675ae4fe56dcd3833dac249816f097303bb09
Signed-off-by: Luca Milanesio <luca.milanesio@gmail.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.jgit/src')
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackFile.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackFile.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackFile.java index 9a1d12f407..2ca9e83f1c 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackFile.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackFile.java @@ -164,8 +164,8 @@ public class PackFile implements Iterable<PackIndex.MutableEntry> { */ public PackFile(final File packFile, int extensions) { this.packFile = packFile; - this.packLastModified = (int) (packFile.lastModified() >> 10); this.fileSnapshot = FileSnapshot.save(packFile); + this.packLastModified = (int) (fileSnapshot.lastModified() >> 10); this.extensions = extensions; // Multiply by 31 here so we can more directly combine with another |