]> source.dussan.org Git - jgit.git/commit
Fix handling of option core.supportsAtomicCreateNewFile 76/128876/1
authorChristian Halstrick <christian.halstrick@sap.com>
Fri, 17 Aug 2018 15:46:09 +0000 (17:46 +0200)
committerMatthias Sohn <matthias.sohn@sap.com>
Thu, 6 Sep 2018 22:33:14 +0000 (00:33 +0200)
commit2faccd5b3206e996c9e2cafb95d806d50a9b9d4d
tree8649ea1d0bd8d0bd37710d363911ca4e2179e90a
parentb7351facd51aa8e14d4bd2e74e3f4f0b57c55f6f
Fix handling of option core.supportsAtomicCreateNewFile

When core.supportsAtomicCreateNewFile was set to false and the
repository was located on a filesystem which doesn't support the file
attribute "unix:nlink" then FS_POSIX#createNewFile may report an error
even if everything was ok. Modify FS_POSIX#createNewFile to silently
ignore this situation. An example of such a filesystem is sshfs where
reading "unix:nlink" always returns 1 (instead of throwing a exception).

Bug: 537969
Change-Id: I6deda7672fa7945efa8706ea1cd652272604ff19
Also-by: Thomas Wolf <thomas.wolf@paranor.ch>
org.eclipse.jgit/src/org/eclipse/jgit/util/FS_POSIX.java