mirror of
https://gerrit.googlesource.com/git-repo
synced 2026-05-31 15:09:48 +00:00
sync: Fix force_checkout propagation
The force_checkout parameter was not propagated in all calls to Checkout in Sync_LocalHalf. Without this, repo sync --force-checkout can still fail for projects currently on a local branch with no upstream/tracking configuration, because the detach-to-manifest checkout was executed without -f, leaving local modifications or untracked files able to block sync. Change-Id: I58551388e2f906c4db96e220707a369057a71c24 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/579181 Reviewed-by: Gavin Mak <gavinmak@google.com> Commit-Queue: Josef Malmstrom <Josef.Malmstrom@arm.com> Tested-by: Josef Malmstrom <Josef.Malmstrom@arm.com> Reviewed-by: Mike Frysinger <vapier@google.com>
This commit is contained in:
committed by
gerrit-scoped@luci-project-accounts.iam.gserviceaccount.com
parent
12cfc6036a
commit
e3eadd3728
+1
-1
@@ -1767,7 +1767,7 @@ class Project:
|
||||
self, "leaving %s; does not track upstream", branch.name
|
||||
)
|
||||
try:
|
||||
self._Checkout(revid, quiet=True)
|
||||
self._Checkout(revid, force_checkout=force_checkout, quiet=True)
|
||||
if submodules:
|
||||
self._SyncSubmodules(quiet=True)
|
||||
except GitError as e:
|
||||
|
||||
Reference in New Issue
Block a user