mirror of
https://gerrit.googlesource.com/git-repo
synced 2026-05-07 19:39:18 +00:00
e3eadd3728
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>
Repo Tests
There is a mixture of pytest & Python unittest in here. We adopted pytest later on but didn't migrate existing tests (since they still work). New tests should be written using pytest only.
File layout
test_xxx.py: Unittests for thexxxmodule in the main repo codebase. Modules that are in subdirs normalize the/into_. For example, test_error.py is for the error.py module, and test_subcmds_forall.py is for the subcmds/forall.py module.- conftest.py: Custom pytest fixtures for sharing.
- utils_for_test.py: Helpers for sharing in tests.