]> source.dussan.org Git - jgit.git/commit
Determine hard-linking and nlink support per FileStore 85/142385/2
authorThomas Wolf <thomas.wolf@paranor.ch>
Sat, 18 May 2019 21:48:54 +0000 (23:48 +0200)
committerMatthias Sohn <matthias.sohn@sap.com>
Thu, 6 Jun 2019 17:06:09 +0000 (19:06 +0200)
commit1609ce75931b2caa4051b51a3e3e4d6fe242c2f9
treee759294c516d9e35d8824dab0d3bf9e9efb01b9b
parentd7bd2e700c7eb1ea4f3b4a65087331c4ee96a9e5
Determine hard-linking and nlink support per FileStore

It's quite possible that JGit can use the hard-linking mechanism
for atomic file creation on some volumes but not on others.
Ultimately it depends on the file systems on the mounted volumes.

Cache the information per FileStore instead of using a single
global flag. Also catch FileSystemException, it may be thrown
if the operating system reports a failure. The previously caught
AccessDeniedException is a sub-class of FileSystemException.

Bug: 547332
Change-Id: I1ef672b3468b0be79e71674344f16f28f9d11ba1
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
org.eclipse.jgit/src/org/eclipse/jgit/util/FS_POSIX.java