diff options
| author | Sainath Varanasi <varanasisai@google.com> | 2026-06-25 22:09:03 +0000 |
|---|---|---|
| committer | gerrit-scoped@luci-project-accounts.iam.gserviceaccount.com <gerrit-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2026-06-25 15:28:46 -0700 |
| commit | 3af9e2f1462a13a3e344b4fd2e6ed6c4f5403f72 (patch) | |
| tree | 86dae645176976811c024fcb2e2a4e5422b3fdf0 /man | |
| parent | d32b70275c3d1541026aa87d8b1bea55cac215c5 (diff) | |
| download | git-repo-3af9e2f1462a13a3e344b4fd2e6ed6c4f5403f72.tar.gz git-repo-3af9e2f1462a13a3e344b4fd2e6ed6c4f5403f72.zip | |
project: fix sync of shallow projects sharing objdir
Repo sync fails when the following conditions are met:
* There are several checkouts of the same project
in different paths.
* The checkouts are using git hashes as revisions
(not branches).
* There is a clone-depth set on these projects.
* sync-c="true" is set in the manifest.
* The revision specified in the manifest
has moved forward since the first repo init.
The sync fails because only the first gitdir gets the "shallow" file,
and subsequent dirs can't be synced.
Do not optimize away the fetch when the conditions above happen.
Simplified the boolean check in Sync_NetworkHalf and _RemoteFetch
using has_shallow, renamed loop variable to avoid shadowing.
Test: create a manifest matching conditions above, repo init,
forward the hash, and repo sync.
Test: added tests in test_project.py
Bug: 505072873
Originally-by: Elvira Khabirova <elvira.khabirova@volvocars.com>
Change-Id: I37c533c382e34fc5ddab489c5593b9e5d3875be2
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/601441
Tested-by: Sainath Varanasi <varanasisai@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Sainath Varanasi <varanasisai@google.com>
Diffstat (limited to 'man')
0 files changed, 0 insertions, 0 deletions
