)]}'
{
  "commit": "6516fe1a79855fd2aa1e01ec8c99adf68fdd9164",
  "tree": "a4e87d7b5fcda3265f9592ab3eb4581fa99c2d32",
  "parents": [
    "8ee8e96a270daad809589ddc901fe6cf9cddf1a9"
  ],
  "author": {
    "name": "Will Stranton",
    "email": "2659963+willstranton@users.noreply.github.com",
    "time": "Fri Jul 24 11:16:08 2026 -0700"
  },
  "committer": {
    "name": "Copybara-Service",
    "email": "copybara-worker@google.com",
    "time": "Fri Jul 24 11:17:19 2026 -0700"
  },
  "message": "Fix handling of symbolic/hard links when using `strip_components` (https://github.com/bazelbuild/bazel/pull/30044)\n\n### Description\nSee #29999 which describes a case where using `strip_components` does not properly handle symbolic links. This change consolidates the logic for handling `strip_components` into the `StripPrefixedPath` class which already handled `strip_prefix` logic. With the consolidation, we no longer miss the handling of symbolic and hard links.\n\nThis code builds on top of the pull request in https://github.com/bazelbuild/bazel/pull/30042 - those commits are included here.  It is recommended that you review that pull request before reviewing this pull request (so you don\u0027t have to review the same commits twice and to ensure this code is still relevant, since it builds on top of the decisions there).\n\n### Motivation\nFixes #29999 - the code that introduced support for `strip_components` didn\u0027t handle symbolic links correctly.\nFixes #30015\n\n### Build API Changes\n\nNo, this is a bug fix.\n\n### Checklist\n\n- [X] I have added tests for the new use cases (if any).\n- [N/A] I have updated the documentation (if applicable).\n\n### Release Notes\n\nRELNOTES: Fixes an error when using `strip_components` with archives containing symbolic//hard links.\n\nCloses #30044.\n\nPiperOrigin-RevId: 953463943\nChange-Id: I5da2d3182cc99fb152124c2abb4cc437f6e224d8\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "f42d3fd621d7c777e414c9d0db71f924c2c14b85",
      "old_mode": 33188,
      "old_path": "src/main/java/com/google/devtools/build/lib/bazel/repository/decompressor/CompressedTarFunction.java",
      "new_id": "e6720d4171c83f0685fc92316c5afc6aa2b8f656",
      "new_mode": 33188,
      "new_path": "src/main/java/com/google/devtools/build/lib/bazel/repository/decompressor/CompressedTarFunction.java"
    },
    {
      "type": "modify",
      "old_id": "3ad969be867de9d2a136b44e182754fc03a97fa1",
      "old_mode": 33188,
      "old_path": "src/main/java/com/google/devtools/build/lib/bazel/repository/decompressor/DecompressorDescriptor.java",
      "new_id": "3d4d91798d321dc15bea190a202adf470e8c70d0",
      "new_mode": 33188,
      "new_path": "src/main/java/com/google/devtools/build/lib/bazel/repository/decompressor/DecompressorDescriptor.java"
    },
    {
      "type": "modify",
      "old_id": "7fafee19a8094a564aba6dc3302a4e2cbf284c69",
      "old_mode": 33188,
      "old_path": "src/main/java/com/google/devtools/build/lib/bazel/repository/decompressor/SevenZDecompressor.java",
      "new_id": "e5b90e212e7a602c2cfb1c4d122f90687a5d4b86",
      "new_mode": 33188,
      "new_path": "src/main/java/com/google/devtools/build/lib/bazel/repository/decompressor/SevenZDecompressor.java"
    },
    {
      "type": "modify",
      "old_id": "f1a9086cad0989a616ae9d0320488fe375427c82",
      "old_mode": 33188,
      "old_path": "src/main/java/com/google/devtools/build/lib/bazel/repository/decompressor/StripPrefixedPath.java",
      "new_id": "4b5f900c7c9e862944304ef94cf5f283506e0b10",
      "new_mode": 33188,
      "new_path": "src/main/java/com/google/devtools/build/lib/bazel/repository/decompressor/StripPrefixedPath.java"
    },
    {
      "type": "modify",
      "old_id": "59dd28cc365f9f29440cb036144ee8e5d11a4f54",
      "old_mode": 33188,
      "old_path": "src/main/java/com/google/devtools/build/lib/bazel/repository/decompressor/ZipDecompressor.java",
      "new_id": "d25826fb72d1e8994b224d076a475ca0c7aa7637",
      "new_mode": 33188,
      "new_path": "src/main/java/com/google/devtools/build/lib/bazel/repository/decompressor/ZipDecompressor.java"
    },
    {
      "type": "modify",
      "old_id": "e7c3b67280f87cc20e6debc50d0757fc7a52f378",
      "old_mode": 33188,
      "old_path": "src/main/java/com/google/devtools/build/lib/bazel/repository/starlark/StarlarkBaseExternalContext.java",
      "new_id": "efb8d29fe994cbb536c804bbb71a3e1da513089f",
      "new_mode": 33188,
      "new_path": "src/main/java/com/google/devtools/build/lib/bazel/repository/starlark/StarlarkBaseExternalContext.java"
    },
    {
      "type": "modify",
      "old_id": "9f153bc250415398a872a072356411900730a1a1",
      "old_mode": 33188,
      "old_path": "src/test/java/com/google/devtools/build/lib/bazel/repository/decompressor/CompressedTarFunctionTest.java",
      "new_id": "f35d741664c7c00604f52632216c43f5b0555c67",
      "new_mode": 33188,
      "new_path": "src/test/java/com/google/devtools/build/lib/bazel/repository/decompressor/CompressedTarFunctionTest.java"
    },
    {
      "type": "modify",
      "old_id": "ed9bfefb8b624d512cb99088f4b474fcb058f902",
      "old_mode": 33188,
      "old_path": "src/test/java/com/google/devtools/build/lib/bazel/repository/decompressor/StripPrefixedPathTest.java",
      "new_id": "0efe06851433c4344f3ca5ab754b4be18d51086a",
      "new_mode": 33188,
      "new_path": "src/test/java/com/google/devtools/build/lib/bazel/repository/decompressor/StripPrefixedPathTest.java"
    }
  ]
}
