)]}'
{
  "commit": "fa5ba2c1dd0ce1bd060f423e7b1eb39d06fcd2cd",
  "tree": "ecd489b63eb5312408ff2c54b98f0d872db1a068",
  "parents": [
    "58aaced4442a6daae1c82318f3f9259001714505"
  ],
  "author": {
    "name": "Jeff King",
    "email": "peff@peff.net",
    "time": "Thu Oct 12 20:18:37 2017 -0400"
  },
  "committer": {
    "name": "Junio C Hamano",
    "email": "gitster@pobox.com",
    "time": "Mon Oct 16 11:57:45 2017 +0900"
  },
  "message": "diff: fix infinite loop with --color-moved --ignore-space-change\n\nThe --color-moved code uses next_byte() to advance through\nthe blob contents. When the user has asked to ignore\nwhitespace changes, we try to collapse any whitespace change\ndown to a single space.\n\nHowever, we enter the conditional block whenever we see the\nIGNORE_WHITESPACE_CHANGE flag, even if the next byte isn\u0027t\nwhitespace.\n\nThis means that the combination of \"--color-moved and\n--ignore-space-change\" was completely broken. Worse, because\nwe return from next_byte() without having advanced our\npointer, the function makes no forward progress in the\nbuffer and loops infinitely.\n\nFix this by entering the conditional only when we actually\nsee whitespace. We can apply this also to the\nIGNORE_WHITESPACE change. That code path isn\u0027t buggy\n(because it falls through to returning the next\nnon-whitespace byte), but it makes the logic more clear if\nwe only bother to look at whitespace flags after seeing that\nthe next byte is whitespace.\n\nReported-by: Orgad Shaneh \u003corgads@gmail.com\u003e\nSigned-off-by: Jeff King \u003cpeff@peff.net\u003e\nSigned-off-by: Junio C Hamano \u003cgitster@pobox.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "0c604726c06b07c2cd17bbdf05dc669ae92e5ae4",
      "old_mode": 33188,
      "old_path": "diff.c",
      "new_id": "af9b9528861f4dd1ea901b5c9bc897e335cf2cb1",
      "new_mode": 33188,
      "new_path": "diff.c"
    },
    {
      "type": "modify",
      "old_id": "c3b697411ab16a0dc21ce7579046765ccbeddfbd",
      "old_mode": 33261,
      "old_path": "t/t4015-diff-whitespace.sh",
      "new_id": "66cad4d629bf19cfcba23c452a7d35b7322f8205",
      "new_mode": 33261,
      "new_path": "t/t4015-diff-whitespace.sh"
    }
  ]
}
