)]}'
{
  "commit": "95ca1f987edd23389e3079d0a7fe6d0f89927b68",
  "tree": "848a3df16861c43f43e8161eeae352e597337ce6",
  "parents": [
    "a4fea08b6ebc2782891abdf6fd4bb9feeb21ff4d"
  ],
  "author": {
    "name": "Ævar Arnfjörð Bjarmason",
    "email": "avarab@gmail.com",
    "time": "Sun Jan 24 18:28:13 2021 +0100"
  },
  "committer": {
    "name": "Junio C Hamano",
    "email": "gitster@pobox.com",
    "time": "Sun Jan 24 16:09:17 2021 -0800"
  },
  "message": "grep/pcre2: better support invalid UTF-8 haystacks\n\nImprove the support for invalid UTF-8 haystacks given a non-ASCII\nneedle when using the PCREv2 backend.\n\nThis is a more complete fix for a bug I started to fix in\n870eea8166 (grep: do not enter PCRE2_UTF mode on fixed matching,\n2019-07-26), now that PCREv2 has the PCRE2_MATCH_INVALID_UTF mode we\ncan make use of it.\n\nThis fixes the sort of case described in 8a5999838e (grep: stess test\nPCRE v2 on invalid UTF-8 data, 2019-07-26), i.e.:\n\n    - The subject string is non-ASCII (e.g. \"ævar\")\n    - We\u0027re under a is_utf8_locale(), e.g. \"en_US.UTF-8\", not \"C\"\n    - We are using --ignore-case, or we\u0027re a non-fixed pattern\n\nIf those conditions were satisfied and we matched found non-valid\nUTF-8 data PCREv2 might bark on it, in practice this only happened\nunder the JIT backend (turned on by default on most platforms).\n\nUltimately this fixes a \"regression\" in b65abcafc7 (\"grep: use PCRE v2\nfor optimized fixed-string search\", 2019-07-01), I\u0027m putting that in\nscare-quotes because before then we wouldn\u0027t properly support these\ncomplex case-folding, locale etc. cases either, it just broke in\ndifferent ways.\n\nThere was a bug related to this the PCRE2_NO_START_OPTIMIZE flag fixed\nin PCREv2 10.36. It can be worked around by setting the\nPCRE2_NO_START_OPTIMIZE flag. Let\u0027s do that in those cases, and add\ntests for the bug.\n\nSigned-off-by: Ævar Arnfjörð Bjarmason \u003cavarab@gmail.com\u003e\nSigned-off-by: Junio C Hamano \u003cgitster@pobox.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "4edfda3e009d5b124d06de1ff59d277f250e8bf2",
      "old_mode": 33188,
      "old_path": "Makefile",
      "new_id": "42a7ed96e2778a453347738cb12c92f046903020",
      "new_mode": 33188,
      "new_path": "Makefile"
    },
    {
      "type": "modify",
      "old_id": "efeb6dc58dbec7dad4ea715909d92780faa27ee0",
      "old_mode": 33188,
      "old_path": "grep.c",
      "new_id": "ad0af66a260cef6785fba53e8e76fd8c9439f9ae",
      "new_mode": 33188,
      "new_path": "grep.c"
    },
    {
      "type": "modify",
      "old_id": "b5c4e223a8f337fb476b5e375685045189389e82",
      "old_mode": 33188,
      "old_path": "grep.h",
      "new_id": "ade21c8812b04d6e08853dd1940c5ea5ded43fef",
      "new_mode": 33188,
      "new_path": "grep.h"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "5258fdddba0eb36829c04216fbb71b1a196810d0",
      "new_mode": 33188,
      "new_path": "t/helper/test-pcre2-config.c"
    },
    {
      "type": "modify",
      "old_id": "9d6d14d92937533e84bb30fc689750cceb1180b1",
      "old_mode": 33188,
      "old_path": "t/helper/test-tool.c",
      "new_id": "f97cd9f48a69048db519ffc0519a99559f543b31",
      "new_mode": 33188,
      "new_path": "t/helper/test-tool.c"
    },
    {
      "type": "modify",
      "old_id": "a6470ff62c42521d3ba16e505d37b31b53554925",
      "old_mode": 33188,
      "old_path": "t/helper/test-tool.h",
      "new_id": "28072c0ad5ab446eab4b37d915222b6768dc2e66",
      "new_mode": 33188,
      "new_path": "t/helper/test-tool.h"
    },
    {
      "type": "modify",
      "old_id": "38457c2e4f10eb43829ee9524101c5f87eaf4c36",
      "old_mode": 33261,
      "old_path": "t/t7812-grep-icase-non-ascii.sh",
      "new_id": "e5d1e4ea6862694b0392415807d37ef4d3efc71b",
      "new_mode": 33261,
      "new_path": "t/t7812-grep-icase-non-ascii.sh"
    }
  ]
}
