)]}'
{
  "commit": "4f8c993c494f1708eef264ca6e6e5193513ab51b",
  "tree": "83b298de486c3fbb4cec30d8e0659da2e6792e90",
  "parents": [
    "3d8e6b1e16092701c31463092e945b8f00886bb7"
  ],
  "author": {
    "name": "Shawn Pearce",
    "email": "sop@google.com",
    "time": "Sun Dec 13 20:26:01 2015 -0800"
  },
  "committer": {
    "name": "Shawn Pearce",
    "email": "sop@google.com",
    "time": "Mon Dec 14 09:18:27 2015 -0800"
  },
  "message": "push: Do not blindly overwrite peer\n\nIf an application uses PushConnection directly on the native Git wire\nprotocols JGit should send along the application\u0027s expected oldId, not\nthe advertised value.  This allows the remote peer to compare-and-swap\nsince it was not tested inside JGit.\n\nDiscovered when I tried to use a PushConnection (bypassing the\nstandard PushProcess) and the client blindly overwrote the remote\nreference, even though my app had supplied the wrong ObjectId for\nthe expectedOldObjectId. This was not expected and cost me over an\nhour of debugging, plus \"corruption\" in the remote repository.\n\nBy passing along the exact expectedOldObjectId from the app the\nremote side can do the check that the application skipped, and\navoid data loss.\n\nChange-Id: Id3920837e6c47100376225bb4dd61fa3e88c64db\n",
  "tree_diff": [
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "a3b4134aeaf0fbbde8c90e024469bd5b05758ac7",
      "new_mode": 33188,
      "new_path": "org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/PushConnectionTest.java"
    },
    {
      "type": "modify",
      "old_id": "f7bac6d060978d860343df2974d79e6f42d20ac2",
      "old_mode": 33188,
      "old_path": "org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackPushConnection.java",
      "new_id": "0834c359aa14482f3d03728f4fbf504be0d919d0",
      "new_mode": 33188,
      "new_path": "org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackPushConnection.java"
    },
    {
      "type": "modify",
      "old_id": "b557812ad132d59c601dce31ae0249237306eae9",
      "old_mode": 33188,
      "old_path": "org.eclipse.jgit/src/org/eclipse/jgit/transport/PushProcess.java",
      "new_id": "4fd192dbb25c8556e742d3d61eeaa3eafc8164e9",
      "new_mode": 33188,
      "new_path": "org.eclipse.jgit/src/org/eclipse/jgit/transport/PushProcess.java"
    },
    {
      "type": "modify",
      "old_id": "1b82a3610578b4040f8289dc478e931efe12b71d",
      "old_mode": 33188,
      "old_path": "org.eclipse.jgit/src/org/eclipse/jgit/transport/RemoteRefUpdate.java",
      "new_id": "5c5834618955c041e4f1fdb7d93acfa4aa93ba43",
      "new_mode": 33188,
      "new_path": "org.eclipse.jgit/src/org/eclipse/jgit/transport/RemoteRefUpdate.java"
    }
  ]
}
