diff options
author | Kaushik Lingarkar <kaushikl@qti.qualcomm.com> | 2024-12-17 12:49:14 -0800 |
---|---|---|
committer | Kaushik Lingarkar <kaushikl@qti.qualcomm.com> | 2025-02-04 08:07:49 -0800 |
commit | cf9a2a2a76b332c89fef40e47f7ddb4e8c817ab9 (patch) | |
tree | cfecbcec1354e04b5846706eb9b148ddc22c45dd /manifest_xml.py | |
parent | 5ae8292fea94bc26aa8c7345f5230899d3d45a63 (diff) | |
download | git-repo-cf9a2a2a76b332c89fef40e47f7ddb4e8c817ab9.tar.gz |
Update internal filesystem layout for submodules
Change the bare checkout directory for submodules from 'subprojects'
to 'modules'. Git expects bare submodule checkouts to be in the
'modules' directory. If old subproject directories are found, they
will be migrated to the new modules directory. This change is the
first step in ensuring Git can understand repo's submodules to some
extent.
Change-Id: I385029f1bb55d040616d970d6ffb4bb856692520
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/444881
Tested-by: Kaushik Lingarkar <kaushikl@qti.qualcomm.com>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Diffstat (limited to 'manifest_xml.py')
-rw-r--r-- | manifest_xml.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/manifest_xml.py b/manifest_xml.py index cdab31e6..347ae5ef 100644 --- a/manifest_xml.py +++ b/manifest_xml.py | |||
@@ -2056,7 +2056,12 @@ https://gerrit.googlesource.com/git-repo/+/HEAD/docs/manifest-format.md | |||
2056 | path = path.rstrip("/") | 2056 | path = path.rstrip("/") |
2057 | name = name.rstrip("/") | 2057 | name = name.rstrip("/") |
2058 | relpath = self._JoinRelpath(parent.relpath, path) | 2058 | relpath = self._JoinRelpath(parent.relpath, path) |
2059 | gitdir = os.path.join(parent.gitdir, "subprojects", "%s.git" % path) | 2059 | subprojects = os.path.join(parent.gitdir, "subprojects", f"{path}.git") |
2060 | modules = os.path.join(parent.gitdir, "modules", path) | ||
2061 | if platform_utils.isdir(subprojects): | ||
2062 | gitdir = subprojects | ||
2063 | else: | ||
2064 | gitdir = modules | ||
2060 | objdir = os.path.join( | 2065 | objdir = os.path.join( |
2061 | parent.gitdir, "subproject-objects", "%s.git" % name | 2066 | parent.gitdir, "subproject-objects", "%s.git" % name |
2062 | ) | 2067 | ) |