)]}'
{
  "commit": "2824e1841b99393d2469c495253d547c643bd8f1",
  "tree": "4b4f7532ab4b0be6b2b59d7ff4cf09956b5987fd",
  "parents": [
    "dc06dc880013d48f2b09c6b4295419382f3b8230"
  ],
  "author": {
    "name": "Jeff King",
    "email": "peff@peff.net",
    "time": "Thu Feb 11 17:28:36 2016 -0500"
  },
  "committer": {
    "name": "Junio C Hamano",
    "email": "gitster@pobox.com",
    "time": "Wed Mar 16 10:41:04 2016 -0700"
  },
  "message": "list-objects: pass full pathname to callbacks\n\nWhen we find a blob at \"a/b/c\", we currently pass this to\nour show_object_fn callbacks as two components: \"a/b/\" and\n\"c\". Callbacks which want the full value then call\npath_name(), which concatenates the two. But this is an\ninefficient interface; the path is a strbuf, and we could\nsimply append \"c\" to it temporarily, then roll back the\nlength, without creating a new copy.\n\nSo we could improve this by teaching the callsites of\npath_name() this trick (and there are only 3). But we can\nalso notice that no callback actually cares about the\nbroken-down representation, and simply pass each callback\nthe full path \"a/b/c\" as a string. The callback code becomes\neven simpler, then, as we do not have to worry about freeing\nan allocated buffer, nor rolling back our modification to\nthe strbuf.\n\nThis is theoretically less efficient, as some callbacks\nwould not bother to format the final path component. But in\npractice this is not measurable. Since we use the same\nstrbuf over and over, our work to grow it is amortized, and\nwe really only pay to memcpy a few bytes.\n\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": "c886258b75ab9bf0bf34789b67028c35c4c98071",
      "old_mode": 33188,
      "old_path": "builtin/pack-objects.c",
      "new_id": "4af92f113c8423aa4749d2ddb19be95e68d43c13",
      "new_mode": 33188,
      "new_path": "builtin/pack-objects.c"
    },
    {
      "type": "modify",
      "old_id": "3d3a2665f1c94841fa78e45ff2d5511c489c0c36",
      "old_mode": 33188,
      "old_path": "builtin/rev-list.c",
      "new_id": "7ae255862aaa43fb20969b75d9e434902ec2cba1",
      "new_mode": 33188,
      "new_path": "builtin/rev-list.c"
    },
    {
      "type": "modify",
      "old_id": "0d56b50a15888e3854843103b4e2d9b84d8b87b9",
      "old_mode": 33188,
      "old_path": "list-objects.c",
      "new_id": "37d0d10ab2b9b512c9da7b44ae0f275e755fd8d6",
      "new_mode": 33188,
      "new_path": "list-objects.c"
    },
    {
      "type": "modify",
      "old_id": "69c4c7de6efef0e6faa21a10438ea362b151e623",
      "old_mode": 33188,
      "old_path": "list-objects.h",
      "new_id": "0cebf8585cb179ae46fd8238eaf2b2162739bbaa",
      "new_mode": 33188,
      "new_path": "list-objects.h"
    },
    {
      "type": "modify",
      "old_id": "e49255df6c1a036b6d5f053c63b94884e0fa169a",
      "old_mode": 33188,
      "old_path": "pack-bitmap-write.c",
      "new_id": "b2f6cb537cc8ddbeb124ca07a940e5e405e7c761",
      "new_mode": 33188,
      "new_path": "pack-bitmap-write.c"
    },
    {
      "type": "modify",
      "old_id": "d12e56511a198e1521c8c7bbe5580a5c725c1fa6",
      "old_mode": 33188,
      "old_path": "pack-bitmap.c",
      "new_id": "aee7acf39204178f605221e49c66d302ca5329aa",
      "new_mode": 33188,
      "new_path": "pack-bitmap.c"
    },
    {
      "type": "modify",
      "old_id": "4379d1ac79c4a54a30af3c22f1f756569977fb75",
      "old_mode": 33188,
      "old_path": "reachable.c",
      "new_id": "9b0295469f562998ecffb8c8608d887c973bbce5",
      "new_mode": 33188,
      "new_path": "reachable.c"
    },
    {
      "type": "modify",
      "old_id": "1ff6709d4be716e2f5931a2f9d497510e8fe9935",
      "old_mode": 33188,
      "old_path": "revision.c",
      "new_id": "871812db2a34d584662f9032c207695e82aae14a",
      "new_mode": 33188,
      "new_path": "revision.c"
    },
    {
      "type": "modify",
      "old_id": "3a4cf9e61b147d814956c4d67476138bc6e4861f",
      "old_mode": 33188,
      "old_path": "revision.h",
      "new_id": "1b58aacc03bd330ebf70ee71aac0d38fd18743c7",
      "new_mode": 33188,
      "new_path": "revision.h"
    }
  ]
}
