Now __init__ is pep8-compliant
This commit is contained in:
@@ -50,19 +50,27 @@ def init_repository(path, bare=False):
|
|||||||
|
|
||||||
|
|
||||||
def clone_repository(
|
def clone_repository(
|
||||||
url, path, bare=False, remote_name="origin", push_url=None, fetch_spec=None,
|
url, path, bare=False, remote_name="origin",
|
||||||
|
push_url=None, fetch_spec=None,
|
||||||
push_spec=None, checkout_branch=None):
|
push_spec=None, checkout_branch=None):
|
||||||
"""
|
"""
|
||||||
Clones a new Git repository from *url* in the given *path*.
|
Clones a new Git repository from *url* in the given *path*.
|
||||||
|
|
||||||
Parameters:
|
Parameters:
|
||||||
* If 'bare' is True, then a bare git repository will be created.
|
* 'bare' indicates whether a bare git repository should be created.
|
||||||
* 'remote_name' is the name given to the "origin" remote. The default is "origin".
|
* 'remote_name' is the name given to the "origin" remote.
|
||||||
* 'push_url' is a URL to be used for pushing. None means use the fetch url.
|
The default is "origin".
|
||||||
* 'fetch_spec' is the fetch specification to be used for fetching. None results in the same behavior as GIT_REMOTE_DEFAULT_FETCH.
|
* 'push_url' is a URL to be used for pushing.
|
||||||
* 'push_spec' is the fetch specification to be used for pushing. None means use the same spec as for 'fetch_spec'.
|
None means use the fetch url.
|
||||||
* 'checkout_branch' gives the name of the branch to checkout. None means use the remote's HEAD
|
* 'fetch_spec' is the fetch specification to be used for fetching.
|
||||||
|
None results in the same behavior as GIT_REMOTE_DEFAULT_FETCH.
|
||||||
|
* 'push_spec' is the fetch specification to be used for pushing.
|
||||||
|
None means use the same spec as for 'fetch_spec'.
|
||||||
|
* 'checkout_branch' gives the name of the branch to checkout.
|
||||||
|
None means use the remote's HEAD
|
||||||
"""
|
"""
|
||||||
|
|
||||||
_pygit2.clone_repository(url, path, bare, remote_name, push_url, fetch_spec, push_spec, checkout_branch)
|
_pygit2.clone_repository(
|
||||||
|
url, path, bare, remote_name, push_url,
|
||||||
|
fetch_spec, push_spec, checkout_branch)
|
||||||
return Repository(path)
|
return Repository(path)
|
||||||
|
Reference in New Issue
Block a user