[Diff][Added] Recursive submodules init for worktree

This commit is contained in:
Salvador E. Tropea 2023-06-07 09:43:14 -03:00
parent 7a7beff556
commit 8d48519551
1 changed files with 1 additions and 2 deletions

View File

@ -408,8 +408,7 @@ class DiffOptions(BaseOptions):
logger.debug('Checking out '+name+' to '+git_tmp_wd)
self.run_git(['worktree', 'add', git_tmp_wd, name])
self._worktrees_to_remove.append(git_tmp_wd)
self.run_git(['submodule', 'init'], cwd=git_tmp_wd)
self.run_git(['submodule', 'update'], cwd=git_tmp_wd)
self.run_git(['submodule', 'update', '--init', '--recursive'], cwd=git_tmp_wd)
name_copy = self.run_git(['ls-files', '--full-name', self.file])
name_copy = os.path.join(git_tmp_wd, name_copy)
logger.debug('- Using temporal copy: '+name_copy)