)]}'
{
  "commit": "d27d6829a84f488b7253ea693dcc429076c33914",
  "tree": "8ca77dd2aa718648a449107c0b264d4d7127288c",
  "parents": [
    "0ea57e2eedbeae43e03c50b3aca4b890238d639f"
  ],
  "author": {
    "name": "Rahul Yadav",
    "email": "yadavrah@google.com",
    "time": "Tue Sep 01 15:45:32 2026 +0000"
  },
  "committer": {
    "name": "gerrit-scoped@luci-project-accounts.iam.gserviceaccount.com",
    "email": "gerrit-scoped@luci-project-accounts.iam.gserviceaccount.com",
    "time": "Thu Sep 03 02:15:23 2026 -0700"
  },
  "message": "project: check upstream ref ancestry for non-shallow clones\n\nIn _CheckForImmutableRevision, commit d9cc0a15 restricted upstream ref\nvalidation strictly to superprojects (if use_superproject) to prevent\nshallow clones with an upstream attribute from failing ancestry checks\nand falling back to full clones.\n\nHowever, restricting this check exclusively to superprojects broke\nnon-shallow projects with pinned immutable revisions (such as in Smart\nSync, `repo sync -t \u003cBUILD_ID\u003e`, or pinned manifests): When the target\ncommit already exists in the local Git object store (for instance,\nprefetched into refs/prefetch/ by a background daemon or via shared\nobject dirs), _CheckForImmutableRevision returned True without verifying\nthat the local tracking ref (refs/remotes/\u003cremote\u003e/\u003cupstream\u003e) is\npresent and reaches the revision. As a result, _RemoteFetch skipped\nfetching the upstream branch, leaving the local tracking ref stale or\nmissing. Subsequent `repo start` branches tracking that remote branch\ndiverged, causing `repo upload` to attempt uploading all intermediate\ncommits between the stale tracking ref and HEAD.\n\nRestore upstream ancestry validation in _CheckForImmutableRevision for\nnon-shallow projects when upstream is specified. Also pass the sync\ndepth into _CheckForImmutableRevision call sites so shallow checkouts\ncontinue to skip upstream verification and avoid triggering un-shallow\nfallbacks.\n\nTest: PYTHONPATH\u003d. pytest tests/test_project.py\nChange-Id: Ib5bdf41810bb06c8ed053447209ddc2e488f3913\nReviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/624361\nTested-by: Rahul Yadav \u003cyadavrah@google.com\u003e\nCommit-Queue: Rahul Yadav \u003cyadavrah@google.com\u003e\nReviewed-by: Gavin Mak \u003cgavinmak@google.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "75f91abbce5dfeadeb30fda2be13ae77b62f6921",
      "old_mode": 33188,
      "old_path": "project.py",
      "new_id": "2f72bb02d938e5db33ebb1987d625768137fd089",
      "new_mode": 33188,
      "new_path": "project.py"
    },
    {
      "type": "modify",
      "old_id": "c2db279dc8fb050fbdf0c8b422e1cbd03e8c29d7",
      "old_mode": 33188,
      "old_path": "tests/test_project.py",
      "new_id": "af296c2fb6a2fe10a20bee68572d6f5d975b9262",
      "new_mode": 33188,
      "new_path": "tests/test_project.py"
    }
  ]
}
