)]}'
{
  "commit": "dc390672c2b73f5bd3f72fff33a00bb12f88c1d6",
  "tree": "ccea8c5c136089135bda085ed1c57506805aa368",
  "parents": [
    "f90c3d9df882a9da4a66457f47dd3d99b3df3dd5"
  ],
  "author": {
    "name": "Matt Stark",
    "email": "msta@google.com",
    "time": "Tue Oct 20 12:57:42 2026 +1100"
  },
  "committer": {
    "name": "gn-scoped@luci-project-accounts.iam.gserviceaccount.com",
    "email": "gn-scoped@luci-project-accounts.iam.gserviceaccount.com",
    "time": "Mon Oct 19 22:34:34 2026 -0700"
  },
  "message": "Refactor string_output_buffer to support \"Reserve\".\n\nOn its own, it is 2% faster, but not statistically significant.\n\nThe main benefit here is that if we support reserve, we can implement\nsomething akin to the following. Then we can, instead of allocating a\nbuffer for the escaped value, generating it, then copying it to the\nbuffer, write it directly.\n\nstruct NinjaEscaped {\n  inner: \u0026str\n}\n\nimpl WriteBuf for NinjaEscaped {\n  fn MaximumSize(\u0026self) -\u003e usize { inner.size() * 3 }\n  fn Write(\u0026self, dst: \u0026mut [char], upto: \u0026mut idx) {\n    for c in self.inner.chars() {\n      if needs_ninja_escape(c) {\n        dst[upto++] \u003d \u0027\\\u0027\n      }\n      dst[upto++] \u003d c\n  }\n}\n\nChange-Id: I82469ade090787853e9c83085c7c1dfa6a6a6964\nReviewed-on: https://gn-review.googlesource.com/c/gn/+/27640\nReviewed-by: Takuto Ikuta \u003ctikuta@google.com\u003e\nCommit-Queue: Matt Stark \u003cmsta@google.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "2435fa18c45c48f0053806849c1f9d9ea0dff38e",
      "old_mode": 33188,
      "old_path": "src/gn/string_output_buffer.cc",
      "new_id": "d02f707813a48314950a9f37fcc4a79a20d8588c",
      "new_mode": 33188,
      "new_path": "src/gn/string_output_buffer.cc"
    },
    {
      "type": "modify",
      "old_id": "2338860ed5190f160d7ba1d1810ecad3e85fc5c4",
      "old_mode": 33188,
      "old_path": "src/gn/string_output_buffer.h",
      "new_id": "98c3b9a306579ea53b0a40e2e84eeb7515dfe8ce",
      "new_mode": 33188,
      "new_path": "src/gn/string_output_buffer.h"
    },
    {
      "type": "modify",
      "old_id": "6dcb741fa9b324b0b0bdb518b947a89ba3a8ef92",
      "old_mode": 33188,
      "old_path": "src/gn/string_output_buffer_unittest.cc",
      "new_id": "9067fd1eb28dd967c55fa9c9c7e866187676132b",
      "new_mode": 33188,
      "new_path": "src/gn/string_output_buffer_unittest.cc"
    }
  ]
}
