mirror of
https://gerrit.googlesource.com/git-repo
synced 2026-10-04 20:47:07 +00:00
The submodules to sync are derived from their parent before it is fetched, so one that the parent's new revision no longer holds a gitlink for is still synced. Interleaved sync then fails to check it out, because `git submodule init` no longer knows that path: error: Cannot checkout a/c error: pathspec '.../a/c' did not match any file(s) known to git Report such submodules while the gitlinks are read again, and leave them out of the fetch and of the checkout, so the usual project list update removes them from the working tree. Phased sync already left them out of the checkout, but still fetched them. Nothing is reported as removed while the gitlinks of a parent cannot be read, since a missing gitlink cannot be told apart from a fetch that did not happen. Bug: 550074864 Change-Id: Ia429b35c12758a68e4df73665e5512a201af658a Signed-off-by: kimhappy <hwanhee.kim@laplacian.cc> Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/621681 Reviewed-by: Gavin Mak <gavinmak@google.com> Reviewed-by: Brian Gan <brgan@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.