)]}'
{
  "commit": "3f150ba4ca9ecaacd90347624faaf22856eeaec9",
  "tree": "077ae05761bb7c46cac4ffa71a411c8cc74e4970",
  "parents": [
    "33fc618e1213b66e2024213b04cbab099e468bf6"
  ],
  "author": {
    "name": "Aidan Wolter",
    "email": "awolter@fuchsia.infra.roller.google.com",
    "time": "Mon Jun 15 11:31:57 2026 -0700"
  },
  "committer": {
    "name": "Copybara-Service",
    "email": "copybara-worker@google.com",
    "time": "Mon Jun 15 13:06:11 2026 -0700"
  },
  "message": "[roll] Roll fuchsia [git] Centralize git path resolution and fix regen\n\nIntroduce a centralized mechanism to resolve Git paths (like HEAD and\nindex) in GN, with full support for git worktrees. This replaces\ndirect accesses to `.git/` files which fail in worktrees because `.git`\nis a file pointing to the real git directory.\n\nAlso fix the GN auto-regeneration bug by implementing a two-step\nresolution in GN:\n1. Resolve the paths to the git files (like HEAD and ref) dynamically\n   using `resolve_git_paths.py` (which uses `git rev-parse --git-path`\n   and is worktree-aware).\n2. Pass these resolved paths as `file_dependencies` to the second\n   `exec_script` call that resolves the actual revision hashes using\n   `resolve_git_revisions.py`.\nThis forces Ninja to rerun GN when HEAD or the branch ref changes,\nwithout the performance penalty of tracking the `index` file at\nGN-time.\n\nPerformance (10 runs)\n- Before (min: 9.38s, mean: 10.00s)\n- After  (min: 9.36s, mean: 10.11s)\n\nTesting:\n- Host Unit Tests:\n  Run python unit tests for Bazel Git input resolution:\n  $ python3 build/bazel/scripts/get_git_head_commit_test.py\n\n- Manual Integration Verification:\n  1. GN Auto-Regeneration (Branch):\n     Create an empty commit on a branch. The next `fx build` must\n     trigger `gn gen` automatically as the branch ref file changed.\n  2. GN Auto-Regeneration (Detached HEAD):\n     Create an empty commit in detached HEAD state. The next\n     `fx build` must trigger `gn gen` automatically as the HEAD\n     file changed.\n  3. Zircon Fast Rebuild (Index tracking):\n     Stage a change (e.g. `git add`). The next `fx build` must\n     rebuild the `version-string.txt` target (appending the\n     `-dirty` suffix) WITHOUT triggering `gn gen`.\n\nTest: python3 build/bazel/scripts/get_git_head_commit_test.py\nTest: Manual integration verification (see description)\nOriginal-Original-Bug: 516876349\nTAG\u003dagy\nCONV\u003dfbaa9ac0-a008-4115-9c94-a99ca81177f3\n\nOriginal-Original-Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/1646937\nOriginal-Original-Revision: 357056196a7f657e2e6143ad5030e1d6707ba54a\nGitOrigin-RevId: c6f8fbb9aff9d4dce42a71af2f2b950422749789\nChange-Id: I4c960a78dd29402d071dab4aadb97b3514e365fb\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "2e1475fbea8d9ff4140d3ddae5d07ebb36c39a9e",
      "old_mode": 33188,
      "old_path": "stem",
      "new_id": "5947156a0b747166b42e51675b18171c25424a24",
      "new_mode": 33188,
      "new_path": "stem"
    }
  ]
}
