jgit/org.eclipse.jgit/.settings
Matthias Sohn 8a0ed8a004 Use FileChannel.open to touch file and set mtime to now
Use options
- StandardOpenOption.CREATE to create touched file if not existing
- StandardOpenOption.SYNC to enforce synch of data and meta data changes
- StandardOpenOption.WRITE

Also set mtime explicitly in FileUtils#touch to the current system time.
This should fix that the previous implementation didn't work on
- locally cached Windows network share (CSC-CACHE filesystem) mapped as
a drive
- nfsv4 mounts on Linux
and that it didn't create unborn file like Linux command "touch".
Apache common's and Guava's touch() use the same approach.

Immediately after creating the probe file used to measure timestamp
resolution touch it. This ensures we always use the local system clock
when measuring filesystem timestamp resolution. This should prevent that
clock skew could influence the measured timestamp resolution in case of
a mounted network filesystem.

Bug: 548598
Change-Id: Iaeaf5967963f582395a195aa637b8188bfadac60
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-07-17 09:42:14 +02:00
..
.api_filters Use FileChannel.open to touch file and set mtime to now 2019-07-17 09:42:14 +02:00
org.eclipse.core.resources.prefs Initial JGit contribution to eclipse.org 2009-09-29 16:47:03 -07:00
org.eclipse.core.runtime.prefs Fix line endings 2010-06-18 23:36:18 +02:00
org.eclipse.jdt.core.prefs Enable warning for resources not managed by try-with-resource 2018-03-03 23:58:47 +01:00
org.eclipse.jdt.ui.prefs Partially revert c0ad77d8 "Enhance Eclipse save actions" 2017-08-30 03:07:18 +02:00
org.eclipse.mylyn.tasks.ui.prefs Use commit message best practices for Mylyn Commit template 2011-09-05 23:57:21 +02:00
org.eclipse.mylyn.team.ui.prefs Use commit message best practices for Mylyn Commit template 2011-09-05 23:57:21 +02:00
org.eclipse.pde.api.tools.prefs Ignore warning for minor version change without API change 2017-11-24 01:12:14 +01:00
org.eclipse.pde.core.prefs Adding PDE API Tools nature to JGit 2010-01-16 10:00:30 -06:00