Upgrade JGit to 5.1.10.201908230655-r

Improvements in 5.1.9 and 5.1.10:
- measure FileStoreAttributes per filesystem
  - improve measuring file timestamp resolution
  - measure minimal racy interval
  - use Instant to increase resolution to 1us (limited by FileTime)
  - persist FileStoreAttributes
  - optional asynchronous measurement of FileStoreAttributes
  - directory - FileStore cache
- cache user and system level gitconfig
- fix supportsAtomicCreateNewFile default to true
- fix non-deterministic hash of archives created by ArchiveCommand

Release notes:
https://projects.eclipse.org/projects/technology.jgit/releases/5.1.9
https://projects.eclipse.org/projects/technology.jgit/releases/5.1.10

Change-Id: Ifc110f1f305d16cb7f3c2dbe55e3b4855c1b7ce1
This commit is contained in:
Matthias Sohn
2019-08-24 10:30:18 +02:00
committed by Luca Milanesio
parent 16a6eeb825
commit 13f55abe3c
3 changed files with 32 additions and 6 deletions

View File

@@ -36,9 +36,12 @@ import com.google.inject.Injector;
import com.google.inject.Module;
import com.google.inject.Provider;
import java.io.File;
import java.io.IOException;
import java.util.Arrays;
import java.util.Collections;
import org.eclipse.jgit.errors.ConfigInvalidException;
import org.eclipse.jgit.lib.Config;
import org.eclipse.jgit.lib.StoredConfig;
import org.eclipse.jgit.storage.file.FileBasedConfig;
import org.eclipse.jgit.util.FS;
import org.eclipse.jgit.util.SystemReader;
@@ -180,6 +183,16 @@ public abstract class StandaloneSiteTest {
public int getTimezone(long when) {
return oldSystemReader.getTimezone(when);
}
@Override
public StoredConfig getUserConfig() throws IOException, ConfigInvalidException {
return oldSystemReader.getUserConfig();
}
@Override
public StoredConfig getSystemConfig() throws IOException, ConfigInvalidException {
return oldSystemReader.getSystemConfig();
}
});
return oldSystemReader;
}

View File

@@ -15,10 +15,13 @@
package com.google.gerrit.server.util.time;
import com.google.common.annotations.VisibleForTesting;
import java.io.IOException;
import java.sql.Timestamp;
import java.time.Instant;
import java.util.function.LongSupplier;
import org.eclipse.jgit.errors.ConfigInvalidException;
import org.eclipse.jgit.lib.Config;
import org.eclipse.jgit.lib.StoredConfig;
import org.eclipse.jgit.storage.file.FileBasedConfig;
import org.eclipse.jgit.util.FS;
import org.eclipse.jgit.util.SystemReader;
@@ -104,6 +107,16 @@ public class TimeUtil {
public int getTimezone(long when) {
return delegate.getTimezone(when);
}
@Override
public StoredConfig getUserConfig() throws IOException, ConfigInvalidException {
return delegate.getUserConfig();
}
@Override
public StoredConfig getSystemConfig() throws IOException, ConfigInvalidException {
return delegate.getSystemConfig();
}
}
private TimeUtil() {}

View File

@@ -1,6 +1,6 @@
load("//tools/bzl:maven_jar.bzl", "MAVEN_CENTRAL", "maven_jar")
_JGIT_VERS = "5.1.7.201904200442-r"
_JGIT_VERS = "5.1.10.201908230655-r"
_DOC_VERS = _JGIT_VERS # Set to _JGIT_VERS unless using a snapshot
@@ -40,28 +40,28 @@ def jgit_maven_repos():
name = "jgit-lib",
artifact = "org.eclipse.jgit:org.eclipse.jgit:" + _JGIT_VERS,
repository = _JGIT_REPO,
sha1 = "ef1f744a1117e3d8916f3770486502a56d241b16",
src_sha1 = "7bf5b5298f8936e959a92f62b5151d58feb9c00a",
sha1 = "f31edd6f2fb29f71e99e032371620e133182b279",
src_sha1 = "59007bae013106211ba6168e2c977baa2ec30045",
unsign = True,
)
maven_jar(
name = "jgit-servlet",
artifact = "org.eclipse.jgit:org.eclipse.jgit.http.server:" + _JGIT_VERS,
repository = _JGIT_REPO,
sha1 = "8306e221fb50985247138adb8ffb0f4cd74c5e9a",
sha1 = "ae18143349233cb08968ed09457d2cbdef191e90",
unsign = True,
)
maven_jar(
name = "jgit-archive",
artifact = "org.eclipse.jgit:org.eclipse.jgit.archive:" + _JGIT_VERS,
repository = _JGIT_REPO,
sha1 = "fefb13ab8331cc8b13a15b653b1e057de7d3e514",
sha1 = "e2c57117cfec84ace6777365c345e200e41e8b3b",
)
maven_jar(
name = "jgit-junit",
artifact = "org.eclipse.jgit:org.eclipse.jgit.junit:" + _JGIT_VERS,
repository = _JGIT_REPO,
sha1 = "f73f1eacc38f8329d9453f1d0353e82404379a89",
sha1 = "dab29b14a9e61998667af0bcc3a9e5a67f58b115",
unsign = True,
)