Skip to content

Commit 032faf7

Browse files
committed
Fixing 80-column width for both the python and C code.
1 parent a377b32 commit 032faf7

2 files changed

Lines changed: 31 additions & 13 deletions

File tree

‎pygit2/__init__.py‎

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,16 +56,27 @@ def clone_repository(
5656
"""
5757
Clones a new Git repository from *url* in the given *path*.
5858
59-
* **bare** indicates whether a bare git repository should be created.
60-
* **remote_name** is the name given to the "origin" remote. The default is "origin".
61-
* **push_url** is a URL to be used for pushing. None means use the *url* parameter.
62-
* **fetch_spec** defines the the default fetch spec. None results in the same behavior as *GIT_REMOTE_DEFAULT_FETCH*.
63-
* **push_spec** is the fetch specification to be used for pushing. None means use the same spec as for *fetch_spec*.
64-
* **checkout_branch** gives the name of the branch to checkout. None means use the remote's *HEAD*.
59+
**bare** indicates whether a bare git repository should be created.
60+
61+
**remote_name** is the name given to the "origin" remote.
62+
The default is "origin".
63+
64+
**push_url** is a URL to be used for pushing.
65+
None means use the *url* parameter.
66+
67+
**fetch_spec** defines the the default fetch spec.
68+
None results in the same behavior as *GIT_REMOTE_DEFAULT_FETCH*.
69+
70+
**push_spec** is the fetch specification to be used for pushing.
71+
None means use the same spec as for *fetch_spec*.
72+
73+
**checkout_branch** gives the name of the branch to checkout.
74+
None means use the remote's *HEAD*.
6575
6676
Returns a Repository class pointing to the newly cloned repository.
6777
68-
If you wish to use the repo, you need to do a checkout for one of the available branches, like this:
78+
If you wish to use the repo, you need to do a checkout for one of
79+
the available branches, like this:
6980
7081
>>> repo = repo.clone_repository("url", "path")
7182
>>> repo.checkout(branch) # i.e.: refs/heads/master

‎src/pygit2.c‎

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,11 @@ init_repository(PyObject *self, PyObject *args) {
9898
};
9999

100100
PyDoc_STRVAR(clone_repository__doc__,
101-
"clone_repository(url, path, bare, remote_name, push_url, fetch_spec, push_spec, checkout_branch)\n"
101+
"clone_repository(url, path, bare, remote_name, push_url,"
102+
"fetch_spec, push_spec, checkout_branch)\n"
102103
"\n"
103-
"Clones a Git repository in the given url to the given path with the specified options.\n"
104+
"Clones a Git repository in the given url to the given path "
105+
"with the specified options.\n"
104106
"\n"
105107
"Arguments:\n"
106108
"\n"
@@ -115,11 +117,14 @@ PyDoc_STRVAR(clone_repository__doc__,
115117
"push_url\n"
116118
" URL to be used for pushing.\n"
117119
"fetch_spec\n"
118-
" The fetch specification to be used for fetching. None results in the same behavior as GIT_REMOTE_DEFAULT_FETCH.\n"
120+
" The fetch specification to be used for fetching. None results in "
121+
"the same behavior as GIT_REMOTE_DEFAULT_FETCH.\n"
119122
"push_spec\n"
120-
" The fetch specification to be used for pushing. None means use the same spec as for 'fetch_spec'\n"
123+
" The fetch specification to be used for pushing. None means use the "
124+
"same spec as for 'fetch_spec'\n"
121125
"checkout_branch\n"
122-
" The name of the branch to checkout. None means use the remote's HEAD.\n");
126+
" The name of the branch to checkout. None means use the remote's "
127+
"HEAD.\n");
123128

124129

125130
PyObject *
@@ -131,7 +136,9 @@ clone_repository(PyObject *self, PyObject *args) {
131136
const char *remote_name, *push_url, *fetch_spec, *push_spec, *checkout_branch;
132137
int err;
133138

134-
if (!PyArg_ParseTuple(args, "zzIzzzzz", &url, &path, &bare, &remote_name, &push_url, &fetch_spec, &push_spec, &checkout_branch))
139+
if (!PyArg_ParseTuple(args, "zzIzzzzz",
140+
&url, &path, &bare, &remote_name, &push_url,
141+
&fetch_spec, &push_spec, &checkout_branch))
135142
return NULL;
136143

137144
git_clone_options opts = {

0 commit comments

Comments
 (0)