)]}'
{
  "commit": "d9cc0a15265299b6dcfc1d65f192fd14cfb17b02",
  "tree": "449d848155bde877400770981f2bce05c0528ecf",
  "parents": [
    "8c3585f367a7d09095a22565a44fa3b47f5b690c"
  ],
  "author": {
    "name": "Krzysztof Wesolowski",
    "email": "krzysztof.wesolowski@volvocars.com",
    "time": "Wed Jul 23 14:40:43 2025 +0200"
  },
  "committer": {
    "name": "LUCI",
    "email": "gerrit-scoped@luci-project-accounts.iam.gserviceaccount.com",
    "time": "Tue Aug 05 08:28:37 2025 -0700"
  },
  "message": "Fix shallow clones when upstream attribute is present\n\nThe _CheckForImmutableRevision method was modified in commit 0e776a58 to\ninclude upstream branch validation for superproject scenarios. However,\nthis change inadvertently broke shallow clones when both clone-depth and\nupstream attributes are specified in regular (non-superproject)\nmanifests.\n\nIssue: When upstream is present, _CheckForImmutableRevision performs two\nadditional checks: 1. git rev-list on the upstream reference 2. git\nmerge-base --is-ancestor between revision and upstream\n\nIn shallow clones, the upstream branch history may not be available\nlocally, causing these checks to fail. This triggers the retry mechanism\nthat removes depth limitations, effectively converting shallow clones to\nfull clones, resulting in excessive disk usage.\n\nFix: Make upstream validation conditional on superproject usage. This\npreserves the original superproject fix while restoring the method\u0027s\noriginal behavior for regular scenarios - checking only if the immutable\nrevision (SHA1/tag) exists locally.\n\nNote: The SetRevisionId method from the same commit 0e776a58 is left\nunchanged as it only stores upstream information (no git operations),\nwhich is beneficial for preserving branch context for commands like\n\u0027repo start\u0027 without causing fetch-related issues.\n\nThe fix ensures that manifests with both clone-depth and upstream work\ncorrectly in non-superproject scenarios, maintaining shallow clone\nefficiency and reducing disk usage.\n\nBug: b/427093249\nChange-Id: I00acd4c61b179cd2abf796c2fecb7a2f38016a18\nReviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/493883\nTested-by: Krzysztof Wesolowski \u003ckrzysztof.wesolowski@volvocars.com\u003e\nCommit-Queue: Krzysztof Wesolowski \u003ckrzysztof.wesolowski@volvocars.com\u003e\nReviewed-by: Mike Frysinger \u003cvapier@google.com\u003e\nReviewed-by: Kamaljeet Maini \u003ckamaljeet@google.com\u003e\nReviewed-by: Xin Li \u003cdelphij@google.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "2badfb025cd8338306964718e6303a497a04e149",
      "old_mode": 33188,
      "old_path": "project.py",
      "new_id": "9bfd4827aba4447b5553486352dabf0229b57eb9",
      "new_mode": 33188,
      "new_path": "project.py"
    }
  ]
}
