)]}'
{
  "commit": "06e06fc291a8ccc0e68b7d84b54097a9635df740",
  "tree": "82e5cf77e0b4ee6519b4e05faebc967418e0ba62",
  "parents": [
    "6bec391d3693a38f812473413db2b4f73acf70fd"
  ],
  "author": {
    "name": "Matthias Sohn",
    "email": "matthias.sohn@sap.com",
    "time": "Sun Aug 26 19:44:29 2018 +0200"
  },
  "committer": {
    "name": "Matthias Sohn",
    "email": "matthias.sohn@sap.com",
    "time": "Fri Sep 07 12:13:53 2018 +0200"
  },
  "message": "Fix atomic lock file creation on NFS\n\nFS_POSIX.createNewFile(File) failed to properly implement atomic file\ncreation on NFS using the algorithm [1]:\n- name of the hard link must be unique to prevent that two processes\n  using different NFS clients try to create the same link. This would\n  render nlink useless to detect if there was a race.\n- the hard link must be retained for the lifetime of the file since we\n  don\u0027t know when the state of the involved NFS clients will be\n  synchronized. This depends on NFS configuration options.\n\nTo fix these issues we need to change the signature of createNewFile\nwhich would break API. Hence deprecate the old method\nFS.createNewFile(File) and add a new method createNewFileAtomic(File).\n\nThe new method returns a LockToken which needs to be retained by the\ncaller (LockFile) until all involved NFS clients synchronized their\nstate. Since we don\u0027t know when the NFS caches are synchronized we need\nto retain the token until the corresponding file is no longer needed.\nThe LockToken must be closed after the LockFile using it has been\ncommitted or unlocked. On Posix, if core.supportsAtomicCreateNewFile \u003d\nfalse this will delete the hard link which guarded the atomic creation\nof the file. When acquiring the lock fails ensure that the hard link is\nremoved.\n\n[1] https://www.time-travellers.org/shane/papers/NFS_considered_harmful.html\nalso see file creation flag O_EXCL in\nhttp://man7.org/linux/man-pages/man2/open.2.html\n\nChange-Id: I84fcb16143a5f877e9b08c6ee0ff8fa4ea68a90d\nSigned-off-by: Matthias Sohn \u003cmatthias.sohn@sap.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "16f184babc6479cbef8a7c765a08984240fcc3e8",
      "old_mode": 33188,
      "old_path": "org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties",
      "new_id": "873cf526bb13957d1d54bf86708900315c74c6b7",
      "new_mode": 33188,
      "new_path": "org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties"
    },
    {
      "type": "modify",
      "old_id": "4b7459c15b45abfed080175f99c5a90728170eb3",
      "old_mode": 33188,
      "old_path": "org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java",
      "new_id": "9ea0aa5702fd174359f24880fb45c76f0ede7845",
      "new_mode": 33188,
      "new_path": "org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java"
    },
    {
      "type": "modify",
      "old_id": "584c4714d80775b9539d893bf911a62ca06faa7f",
      "old_mode": 33188,
      "old_path": "org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/LockFile.java",
      "new_id": "15c52805173fefe786447d13426174d88d8b1f60",
      "new_mode": 33188,
      "new_path": "org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/LockFile.java"
    },
    {
      "type": "modify",
      "old_id": "98e73216b3646ac677d1c2b3226206df6137a98f",
      "old_mode": 33188,
      "old_path": "org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java",
      "new_id": "6b537a4775c5c4c399bf3aa68f29ae386cf9553a",
      "new_mode": 33188,
      "new_path": "org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java"
    },
    {
      "type": "modify",
      "old_id": "9f273d1b846c41d28d6dc49926239fe46b3b027b",
      "old_mode": 33188,
      "old_path": "org.eclipse.jgit/src/org/eclipse/jgit/util/FS_POSIX.java",
      "new_id": "607e078604354442ee1a1efaa3f05211e07de05b",
      "new_mode": 33188,
      "new_path": "org.eclipse.jgit/src/org/eclipse/jgit/util/FS_POSIX.java"
    }
  ]
}
