)]}'
{
  "commit": "5d24afaf9a823b46b0bf41d16c7c351a5cee1fbe",
  "tree": "65d7f17126c6911a30e22711aabae8c8e50abacc",
  "parents": [
    "acb27c67a4a3d4dec4fa02646af8c5494c34aa46"
  ],
  "author": {
    "name": "Peter Weinberger",
    "email": "pjw@google.com",
    "time": "Thu Apr 16 12:13:52 2026 -0400"
  },
  "committer": {
    "name": "Peter Weinberger",
    "email": "pjw@google.com",
    "time": "Sat Jun 27 10:23:20 2026 -0700"
  },
  "message": "internal/imports: use module cache index if it exists\n\ngoimports can be very slow as the existing code\nscans the module cache. The new version uses\nthe index to the module cache if it exists.\n\nThe index usually exists if the user uses gopls.\n\nThere is a new test for the goimports command that\nuses just a module cache index, with no files in\nthe module cache.\n\nNone of the tests in internal/imports needed\nto be changed, as they do not create an index.\n\nOn my laptop the new code executes in .66 seconds\ninstead of 3.4 seconds.\n\ngolang/go#80087 discusses an unresolved edge case\n\nFixes: golang/go#78671\nFixes: golang/go#76310\n\nChange-Id: Ice9a6ef8075fbea9fa4220db2576da0a394e7b10\nReviewed-on: https://go-review.googlesource.com/c/tools/+/767881\nLUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com \u003cgolang-scoped@luci-project-accounts.iam.gserviceaccount.com\u003e\nReviewed-by: Hongxiang Jiang \u003chxjiang@golang.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "f7dec9bef77cd760054f5dd126017cdbe8b246c5",
      "old_mode": 33188,
      "old_path": "cmd/goimports/goimports.go",
      "new_id": "e796905a91cc4e2a5a07409aaad0d4be1892f4ca",
      "new_mode": 33188,
      "new_path": "cmd/goimports/goimports.go"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "192eb282bbdd50d6cbc3927b5dc70b4ab06b91ed",
      "new_mode": 33188,
      "new_path": "cmd/goimports/main_test.go"
    },
    {
      "type": "modify",
      "old_id": "b99ea6c9146f797c1fab460668eccaa8ee654121",
      "old_mode": 33188,
      "old_path": "internal/imports/fix.go",
      "new_id": "6aa1e27e3a493c784f2563d929124b2c53123cc5",
      "new_mode": 33188,
      "new_path": "internal/imports/fix.go"
    },
    {
      "type": "modify",
      "old_id": "76fae6a74bca55ee83f6fb718a2a3fae429bfbb8",
      "old_mode": 33188,
      "old_path": "internal/imports/mod.go",
      "new_id": "a05faf9716367ad5f92c2e92f373ed76567d690d",
      "new_mode": 33188,
      "new_path": "internal/imports/mod.go"
    },
    {
      "type": "modify",
      "old_id": "ec996c3ccf619ac25007f5336f6c995cec701949",
      "old_mode": 33188,
      "old_path": "internal/imports/source_env.go",
      "new_id": "272ae806108c658d5dd5b37afdbcaa25c3033f08",
      "new_mode": 33188,
      "new_path": "internal/imports/source_env.go"
    }
  ]
}
