Eclipse JGit: Java implementation of Git 5.4.2

5.4.2

Description

Features (supporting fixes)

  • Cache FileStoreAttributes per directory, cache size can be configured via FileStoreAttributes#configureAttributesPathCache
  • Persist minimal racy threshold and allow manual configuration
    • Config section is "filesystem"
    • Config subsection is concatenation of
      • Java vendor (system property "java.vendor")
      • Java version (system property "java.version")
      • FileStore's name, on Windows we use the attribute volume:vsn instead since  the name is not necessarily unique.
      • separated by '|'
      • e.g. "AdoptOpenJDK|1.8.0_212-b03|/dev/disk1s1"
    • The config key for minmal racy threshold is "minRacyThreshold" as a time value, supported time units are those supported by DefaultTypedConfigGetter#getTimeUnit
    • If the minimal racy threshold is configured for a given FileStore the configured value is used instead of measuring it.
    • When the minimal racy threshold was measured it is persisted in ~/.gitconfig.
  • Measure minimum racy interval to auto-configure FileSnapshot
  • Measure stored file timestamp resolution instead of time to touch file
  • Use Instant for smudge time in DirCache and DirCacheEntry
  • Use Instant instead of milliseconds for filesystem timestamp handling This enables higher file timestamp resolution on filesystems like ext4, APFS (1ns) or NTFS (100ns) providing high timestamp resolution on filesystem level.
    • Note: on some OSes Java 8, 9 truncate milliseconds
      • see JDK-8177809, fixed in Java 10
      • Up to Java 13 UnixFileAttributes truncate timestamp resolution to microseconds when converting the internal representation to FileTime exposed in the API, this was fixed for Java 14. See JDK-8181493.
      • WindowsFileAttributes also provides only microsecond resolution, there is no fix yet hence we filed a new bug JDK-8231174.
  • Add support for nanoseconds and microseconds for Config#getTimeUnit
  • 546891, 548188 Persist filesystem timestamp resolution and allow manual configuration. To enable persisting filesystem timestamp resolution per FileStore add a new config section to the user global git configuration:
    • Config section is "filesystem"
    • Config subsection is concatenation of
      • Java vendor (system property "java.vendor")
      • runtime version (system property "java.version")
      • FileStore's name
      • separated by '|'
      • e.g. "AdoptOpenJDK|1.8.0_212-b03|/dev/disk1s1"
      • config key for timestamp resolution is "timestampResolution" as a time value, supported time units are those supported by DefaultTypedConfigGetter#getTimeUnit
    • If timestamp resolution is already configured for a given FileStore the configured value is used instead of measuring the resolution.
    • When timestamp resolution was measured it is persisted in ~/.gitconfig
    • Caution: do not attempt to manually configure a higher timestamp resolution than supported by the Java version being used at runtime.
  • 548188 Optionally measure filesystem timestamp resolution asynchronously
    • In order to enable measurement in the background call FileStoreAttributeCache.setAsyncfileStoreAttrCache(true)

      before the first access to cached FileStore attributes.

Bug Fixes

  • Use AtomicReferences to cache user and system level configs
  • 550340 Fix copy-paste typo in CloneCommand#cleanup
  • 319142 Avoid sign extension when comparing mtime with Instant#getEpochSecond
  • Fix NPE in RebaseTodoFile#parseComments
  • Fix NPE in ObjectIdOwnerMap#get
  • Fix NPE in CommitOnlyTest#getHead
  • Cache user global and system-wide git configurations in SystemReader
  • Fix javadoc for SystemReader#getInstance
  • Ensure tests use MockSystemReader
  • 544164 Make supportsAtomicCreateNewFile return true as default
  • 547400 Handle InvalidPathException in FS_POSIX#createNewFileAtomic
  • Override FileBasedConfig's save method in MockConfig
  • Fix OpenSshConfigTest#config: use FS.DETECTED instead of db.getFS()
  • 548947 Android: workaround SecurityException in FS#getFsTimestampResolution
  • 548682 Fix NPE in FS$FileStoreAttributeCache.getFsTimestampResolution
  • 548648 FS: ignore AccessDeniedException when measuring timestamp resolution
  • 548598 Use FileChannel.open to touch file and set mtime to now
  • FileSnapshot#equals: consider UNKNOWN_SIZE
  • 548188 Timeout measuring file timestamp resolution after 2 seconds
  • 548188 Fix RacyGitTests#testRacyGitDetection
  • 526111 Change RacyGitTests to create a racy git situation in a stable way
  • 548312 Fix non-deterministic hash of archives created by ArchiveCommand
  • In LockFile#waitForStatChange wait in units of file time resolution

Build and Release Engineering

  • update orbit to R20190602212107-2019-06
  • update dependencies
    • com.jcraft.jsch" version to 0.1.55.v20190404-1902
    • org.apache.httpcomponents.httpclient to 4.5.6.v20190503-0009
    • org.apache.httpcomponents.httpcore to 4.4.10.v20190123-2214
    • org.mockito to 2.23.0.v20190527-1420
    • org.objenesis to 2.6.0.v20180420-1519
    • net.bytebuddy.byte-buddy 1.9.0.v20181107-1410
    • net.bytebuddy.byte-buddy-agent 1.9.0.v20181106-1534
  • pgm: add missing optional dependency to org.tukaani:xz
  • update Maven pluginscleanup Maven warnings
    • ecj to 3.17.0
    • error_prone_core to 2.3.3
    • jacoco-maven-plugin to 0.8.4
    • japicmp-maven-plugin to 0.14.1
    • maven-compiler-plugin to 3.8.1
    • maven-deploy-plugin to 3.0.0-M1
    • maven-enforcer-plugin to 3.0.0-M2
    • maven-install-plugin to 3.0.0-M1
    • maven-jar-plugin to 3.1.2
    • maven-javadoc-plugin to 3.1.0
    • maven-jxr-plugin to 3.0.0
    • maven-pmd-plugin to 3.12.0
    • maven-resources-plugin to 3.1.0
    • maven-shade-plugin to 3.2.1
    • maven-source-plugin to 3.1.0
    • maven-surefire-plugin to 3.0.0-M3
    • plexus-compiler-eclipse to 2.8.5
    • plexus-compiler-javac to 2.8.5
    • plexus-compiler-javac-errorprone to 2.8.5
    • spotbugs-maven-plugin to 3.1.12
    • tycho-extras to 1.4.0
    • pin version of all used Maven plugins
    • remove deprecated way to declare minimum Maven version
  • Bazel
    • Bazel: enable logging for tests in org.eclipse.jgit.test
    • Increase bazel timeout for long running tests
    • Bazel: Fix lint warning flagged by buildifier
    • Update bazlets to latest version
    • Bazel: Add missing dependencies for ArchiveCommandTest
  • Stop using deprecated Constants.CHARACTER_ENCODING
  • Reuse FileUtils to recursively delete files created by tests
  • Add test for racy git detection in FileSnapshot
  • Fix org.eclipse.jdt.core.prefs of org.eclipse.jgit.junit
  • Enhance RepeatRule to report number of failures at the end
  • Fix FileSnapshotTests for filesystem with high timestamp resolution
  • Retry deleting test files in FileBasedConfigTest
  • Measure filesystem timestamp resolution already in test setup
  • Delete unused FileTreeIteratorWithTimeControl
  • Add missing javadoc in org.eclipse.jgit.junit
  • Deprecate Constants.CHARACTER_ENCODING in favor of StandardCharsets.UTF_8
  • Make inner classes static where possible
  • Ensure root cause of lock creation failures is logged
  • Implement toString in MockSystemReader and MockConfig
  • LockFile: log exception if creation of lock file failed
  • Add debug trace for FileSnapshot
  • Fix error prone warnings
    • Increase severity of AmbiguousMethodReference to ERROR
    • suppress AmbiguousMethodReference in AnyLongObjectId
    • Stop using deprecated Constants.CHARACTER_ENCODING
    • fix ReferenceEquality warning in CommitBuilder
    • suppress NonAtomicVolatileUpdate warning in SimpleLruCache
    • fix ReferenceEquality warning in CommitGraphPane#authorFor
    • fix ReferenceEquality warning in RevWalk#isMergedInto
    • fix ReferenceEquality warning in RefUpdate#updateImpl
    • fix ReferenceEquality warning in static equals methods
    • suppress AmbiguousMethodReference in AnyObjectId
    • fix "FutureReturnValueIgnored" error in FS
    • Repository: fix reference comparison of Files
    • MergeAlgorithm: Suppress Error Prone warning about reference equality
    • Fix NarrowingCompoundAssignment warnings from Error Prone
    • GlobalBundleCache: Fix ClassNewInstance warning from Error Prone
    • Increase severity of NonOverridingEquals to ERROR
    • Increase severity of ImmutableEnumChecker to ERROR
    • BatchRefUpdateTest: Suppress ImmutableEnumChecker warning
    • PacketLineIn: Suppress comparison warnings for END and DELIM
    • FileSnapshot#toString: Suppress ReferenceEquality warnings
    • Blame: Suppress ReferenceEquality warning for RevCommit instances
    • NetscapeCookieFile: Make hash static and group overloaded write
    • NetscapeCookieFile: Javadoc fixes
    • Config: Handle reference-equality warning (and empty javadoc)
    • Increase severity of ShortCircuitBoolean to ERROR
    • ObjectWalk: Prefer boolean operators over logical operators in comparisons
    • BasePackFetchConnection: Prefer boolean operators over logical operators in comparisons
    • PackWriter: Prefer boolean operators over logical operators in comparisons

 

Conforms To UI/UX Guidelines
Not verified