commit - c5b61f2afaf80bdbc222fd88d67189cf13c668d7
commit + 155d507dbcbcad9a55fb934225aa86e9c21a12d1
blob - 5149ed819f8e378d39f971153315b0d5f50f381d
blob + 5bf2112bfdfb23fb71b880f3a18c79f389ebe232
--- dulwich/porcelain.py
+++ dulwich/porcelain.py
origin="origin",
depth=None,
branch=None,
+ config=None,
**kwargs
):
"""Clone a local or remote git repository.
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:
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
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,