)]}'
{
  "commit": "0b6e56dfe6c7f75c2a02cc0cf8731c9e62b6d3d1",
  "tree": "412658ee18221a111f188f765f4223243c8712f0",
  "parents": [
    "dc09e9ec43c09cdf803cc4f39f1fcb8ebcf80eb1"
  ],
  "author": {
    "name": "Junio C Hamano",
    "email": "gitster@pobox.com",
    "time": "Thu Mar 28 17:47:28 2013 -0400"
  },
  "committer": {
    "name": "Junio C Hamano",
    "email": "gitster@pobox.com",
    "time": "Thu Mar 28 21:48:12 2013 -0700"
  },
  "message": "dir.c::match_basename(): pay attention to the length of string parameters\n\nThe function takes two counted strings (\u003cbasename, basenamelen\u003e and\n\u003cpattern, patternlen\u003e) as parameters, together with prefix (the\nlength of the prefix in pattern that is to be matched literally\nwithout globbing against the basename) and EXC_* flags that tells it\nhow to match the pattern against the basename.\n\nHowever, it did not pay attention to the length of these counted\nstrings.  Update them to do the following:\n\n * When the entire pattern is to be matched literally, the pattern\n   matches the basename only when the lengths of them are the same,\n   and they match up to that length.\n\n * When the pattern is \"*\" followed by a string to be matched\n   literally, make sure that the basenamelen is equal or longer than\n   the \"literal\" part of the pattern, and the tail of the basename\n   string matches that literal part.\n\n * Otherwise, use the new fnmatch_icase_mem helper to make\n   sure we only lookmake sure we use only look at the\n   counted part of the strings.  Because these counted strings are\n   full strings most of the time, we check for termination\n   to avoid unnecessary allocation.\n\nSigned-off-by: Junio C Hamano \u003cgitster@pobox.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": "5a83aa7897f270279c403778f43aea6db1efc5af",
      "old_mode": 33188,
      "old_path": "dir.c",
      "new_id": "0db79f9cf6a6b3c1f21b4e0b286bcd9f0ca7df0d",
      "new_mode": 33188,
      "new_path": "dir.c"
    }
  ]
}
