Skip to content

Commit 8dbd44e

Browse files
committed
nightly: Support relative submodule paths
GitPython's internal submodules support is not a direct call to the underlying git submodule interface, but does a bunch of magic that we do not need. It also does not support relative paths, which are now used in OMPI's submodule definition. Switch to using the underlying git submodule calls directly to fetch the submodules. Using the underlying submodules command required us to have a HEAD that is in refs/ as a local branch. Change the checkout command so that the branch we are building is a local branch to stop irritating git submodule commands. Signed-off-by: Brian Barrett <bbarrett@amazon.com>
1 parent 5e798c4 commit 8dbd44e

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

nightly-tarball/Builder.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -376,12 +376,11 @@ def prepare_source_tree(self):
376376
# origin/<branch>/HEAD
377377
self._logger.debug("Switching to branch: " + branch)
378378
if not branch in repo.heads:
379-
# TODO: Can we avoid calling into repo.git here?
380-
repo.git.checkout('origin/' + branch, b=branch)
381-
repo.head.reference = repo.refs['origin/' + branch]
379+
repo.git.checkout(branch)
380+
repo.head.reference = repo.refs[branch]
382381

383382
# And pull in all the right submodules
384-
repo.submodule_update(recursive = True)
383+
repo.git.submodule('update', '--init', '--recursive')
385384

386385
# wish I could figure out how to do this without resorting to
387386
# shelling out to git :/

0 commit comments

Comments
 (0)