)]}'
{
  "commit": "4ee733142ac71556705df02cdab396b804463879",
  "tree": "2f25e8371bc95b3d2860d827ccf1c7ff15a36e9d",
  "parents": [
    "937b403a596d48d01f5fc1ce380b6d6558cb6051"
  ],
  "author": {
    "name": "David Pursehouse",
    "email": "dpursehouse@digital.ai",
    "time": "Wed Apr 22 17:22:09 2020 +0900"
  },
  "committer": {
    "name": "David Pursehouse",
    "email": "dpursehouse@digital.ai",
    "time": "Tue May 12 10:04:19 2020 +0000"
  },
  "message": "PushOne: Improve format of log of references to be pushed\n\nThe references to be pushed are logged by just passing the list\nof RemoteRefUpdate instances to the logger. This results in the\nList\u0027s default implementation of toString() being called, which\nrenders each object in a comma-separated list.\n\nEach object is rendered by RemoteRefUpdate\u0027s toString() method\nwhich includes some fields that are not relevant here, or omits\nsome information that might be useful. For example:\n\n  [RemoteRefUpdate[remoteName\u003drefs/meta/config, NOT_ATTEMPTED,\n  (null)...a7038eb8827cfd29cb3fca335e882f4d5ed09b62, srcRef\u003drefs/meta/config,\n  forceUpdate, message\u003dnull]\n\n- The \u0027remoteName\u0027 is the name on the destination. In this case it\u0027s\n  the same as \u0027srcRef\u0027 but could be different if replication has been\n  configured to push to a different refname. It is potentially confusing\n  to have them not logged next to each other.\n- \u0027(null)...a7038eb8827cfd29cb3fca335e882f4d5ed09b62\u0027 shows the old\n  and new IDs; this is in the standard git ref update format aside\n  from \u0027(null)\u0027 which is shown instead of zeros.\n- \u0027forceUpdate\u0027 is only included when true; this is the same for\n  the \u0027fastForward\u0027 field.\n- the update has a flag indicating if it\u0027s a delete, but this is\n  not included in the output at all.\n- \u0027message\u0027 is always null for udates by replication so it\u0027s not\n  necessary to include in the log.\n\nAdd a custom method to format the refs for logging, with the information\npresented in a clearer way. Continue to log it on a single line, comma-\nseparated. This might not be ideal for human readers, but makes it easier\nwhen processing the logs with grep or any other tool.\n\nWith this change, the logged information looks like:\n\n  RemoteRefUpdate{refSpec\u003drefs/meta/config:refs/meta/config,\n  status\u003dNOT_ATTEMPTED, id\u003d(null)..a7038eb8827cfd29cb3fca335e882f4d5ed09b62\n  force\u003dyes, delete\u003dno, ffwd\u003dno}\n\nNow the irrelevant information (message) is removed, missing information\n(delete) is added, and the source and destination refs are presented in\na single \"refSpec\" field.\n\nChange-Id: Idd153daf44cd79a0920ea0b72c64ea58d0926f59\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "ee291622f7285f7143ab3ccbb5ae0cf9dbfb7cf1",
      "old_mode": 33188,
      "old_path": "src/main/java/com/googlesource/gerrit/plugins/replication/PushOne.java",
      "new_id": "4e5cca6eae9c15c2f0aed9a823708b99b5769ac5",
      "new_mode": 33188,
      "new_path": "src/main/java/com/googlesource/gerrit/plugins/replication/PushOne.java"
    }
  ]
}
