)]}'
{
  "commit": "db2e220447f7b02278d64417c8f05f73710f5b8b",
  "tree": "f5b7b6ac2b3d0a171b2f203c8906a7d5845334ab",
  "parents": [
    "d6a31e08cd300d8085af799ff9fe16b5963caab7"
  ],
  "author": {
    "name": "Jeff King",
    "email": "peff@peff.net",
    "time": "Mon Aug 10 17:48:22 2015 +0200"
  },
  "committer": {
    "name": "Junio C Hamano",
    "email": "gitster@pobox.com",
    "time": "Mon Aug 10 11:01:05 2015 -0700"
  },
  "message": "clone: use computed length in guess_dir_name\n\nCommit 7e837c6 (clone: simplify string handling in\nguess_dir_name(), 2015-07-09) changed clone to use\nstrip_suffix instead of hand-rolled pointer manipulation.\nHowever, strip_suffix will strip from the end of a\nNUL-terminated string, and we may have already stripped some\ncharacters (like directory separators, or \"/.git\"). This\nleads to commands like:\n\n  git clone host:foo.git/\n\nfailing to strip the \".git\".\n\nWe must instead convert our pointer arithmetic into a\ncomputed length and feed that to strip_suffix_mem, which will\nthen reduce the length further for us.\n\nIt would be nicer if we could drop the pointer manipulation\nentirely, and just continually strip using strip_suffix. But\nthat doesn\u0027t quite work for two reasons:\n\n  1. The early suffixes we\u0027re stripping are not constant; we\n     need to look for is_dir_sep, which could be one of\n     several characters.\n\n  2. Mid-way through the stripping we compute the pointer\n     \"start\", which shows us the beginning of the pathname.\n     Which really give us two lengths to work with: the\n     offset from the start of the string, and from the start\n     of the path. By using pointers for the early part, we\n     can just compute the length from \"start\" when we need\n     it.\n\nSigned-off-by: Jeff King \u003cpeff@peff.net\u003e\nAcked-by: Sebastian Schuberth \u003csschuberth@gmail.com\u003e\nSigned-off-by: Patrick Steinhardt \u003cps@pks.im\u003e\nSigned-off-by: Junio C Hamano \u003cgitster@pobox.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "e18839d1077aaa383f601429541f2fc25972f36c",
      "old_mode": 33188,
      "old_path": "builtin/clone.c",
      "new_id": "ed484cb6f488883872be7cde82c67d12cebeab4e",
      "new_mode": 33188,
      "new_path": "builtin/clone.c"
    },
    {
      "type": "modify",
      "old_id": "52f61a090a04a28dee810a255f85ead0e889190b",
      "old_mode": 33261,
      "old_path": "t/t5603-clone-dirname.sh",
      "new_id": "765cc434ef64daac6a2383e32aabbf5581345b78",
      "new_mode": 33261,
      "new_path": "t/t5603-clone-dirname.sh"
    }
  ]
}
