shunsuke-sugita commented on code in PR #64879:
URL: https://github.com/apache/airflow/pull/64879#discussion_r3069309199


##########
providers/git/src/airflow/providers/git/bundles/git.py:
##########
@@ -300,9 +300,13 @@ def _fetch_bare_repo(self):
         reraise=True,
     )
     def _fetch_submodules(self) -> None:
-        self._log.info("Initializing and updating submodules", 
repo_path=self.repo_path)
-        self.repo.git.submodule("sync", "--recursive")
-        self.repo.git.submodule("update", "--init", "--recursive", "--jobs", 
"1")
+        cm = nullcontext()
+        if self.hook and (cmd := self.hook.env.get("GIT_SSH_COMMAND")):
+            cm = self.repo.git.custom_environment(GIT_SSH_COMMAND=cmd)
+        with cm:

Review Comment:
    Variable name: cm is now ssh_env_cm in _fetch_bare_repo and 
_fetch_submodules to reflect that this context manager controls the SSH 
environment for git subprocesses. I left cm as-is for configure_hook_env() 
blocks since that’s broader hook setup.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to