commit a74cb6b9cb0a811a8b66c6552010d49878c5a207 from: Jelmer Vernooij date: Sat Sep 03 22:40:43 2022 UTC Load configuration in dulwich.porcelain.clone. commit - c5b61f2afaf80bdbc222fd88d67189cf13c668d7 commit + a74cb6b9cb0a811a8b66c6552010d49878c5a207 blob - 5149ed819f8e378d39f971153315b0d5f50f381d blob + 5bf2112bfdfb23fb71b880f3a18c79f389ebe232 --- dulwich/porcelain.py +++ dulwich/porcelain.py @@ -407,6 +407,7 @@ def clone( origin="origin", depth=None, branch=None, + config=None, **kwargs ): """Clone a local or remote git repository. @@ -422,6 +423,7 @@ def clone( depth: Depth to fetch at branch: Optional branch or tag to be used as HEAD in the new repository instead of the cloned repository's HEAD. + config: Configuration to use Returns: The new repository """ if outstream is not None: @@ -433,6 +435,9 @@ def clone( stacklevel=3, ) # TODO(jelmer): Capture logging output and stream to errstream + + if config is None: + config = StackedConfig.default() if checkout is None: checkout = not bare @@ -444,7 +449,8 @@ def clone( mkdir = not os.path.exists(target) - (client, path) = get_transport_and_path(source, **kwargs) + (client, path) = get_transport_and_path( + source, config=config, **kwargs) return client.clone( path,