)]}'
{
  "commit": "b6160d950c9ef168d0f7d7c9b2812f280e5b88fb",
  "tree": "ff477be184149287796005aeb522288174d658ae",
  "parents": [
    "9a8c2b67cd5a51666f2c0ce3fbbdb08b97b79b3d"
  ],
  "author": {
    "name": "Raphael Kubo da Costa",
    "email": "raphael.kubo.da.costa@intel.com",
    "time": "Mon Jan 05 11:58:55 2015 +0200"
  },
  "committer": {
    "name": "Junio C Hamano",
    "email": "gitster@pobox.com",
    "time": "Mon Jan 12 15:10:46 2015 -0800"
  },
  "message": "for-each-ref: always check stat_tracking_info()\u0027s return value\n\nThe code handling %(upstream:track) and %(upstream:trackshort)\nassumed that it always had a valid branch that had been sanitized\nearlier in populate_value(), and thus did not check the return value\nof the call to stat_tracking_info().\n\nWhile there is indeed some sanitization code that basically\ncorresponds to stat_tracking_info() returning 0 (no base branch\nset), the function can also return -1 when the base branch did exist\nbut has since then been deleted.\n\nIn this case, num_ours and num_theirs had undefined values and a\ncall to `git for-each-ref --format\u003d\"%(upstream:track)\"` could print\nspurious values such as\n\n  [behind -111794512]\n  [ahead 38881640, behind 5103867]\n\neven for repositories with one single commit.\n\nVerify stat_tracking_info()\u0027s return value and do not print anything\nif it returns -1. This behavior also matches the documentation (\"has\nno effect if the ref does not have tracking information associated\nwith it\").\n\nHelped-by: Eric Sunshine \u003csunshine@sunshineco.com\u003e\nHelped-by: Jeff King \u003cpeff@peff.net\u003e\nSigned-off-by: Raphael Kubo da Costa \u003craphael.kubo.da.costa@intel.com\u003e\nSigned-off-by: Junio C Hamano \u003cgitster@pobox.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "3e1d5c3334e50035fdbf835cfdafbb39c0bacfd0",
      "old_mode": 33188,
      "old_path": "builtin/for-each-ref.c",
      "new_id": "edf9c3c744a01b46337d7503a46b5686be795ed4",
      "new_mode": 33188,
      "new_path": "builtin/for-each-ref.c"
    },
    {
      "type": "modify",
      "old_id": "bda354c1c48bce9fc6fdc442c3ec89fb034f20d3",
      "old_mode": 33261,
      "old_path": "t/t6300-for-each-ref.sh",
      "new_id": "c66bf7981c5328356005963e15262c8d870ac61c",
      "new_mode": 33261,
      "new_path": "t/t6300-for-each-ref.sh"
    }
  ]
}
