From 032faf7017d9b5ac60c37f126697539e0dc8f63b Mon Sep 17 00:00:00 2001 From: Bernardo Heynemann Date: Thu, 16 May 2013 16:09:39 -0300 Subject: [PATCH] Fixing 80-column width for both the python and C code. --- pygit2/__init__.py | 25 ++++++++++++++++++------- src/pygit2.c | 19 +++++++++++++------ 2 files changed, 31 insertions(+), 13 deletions(-) diff --git a/pygit2/__init__.py b/pygit2/__init__.py index be87a49..e246ff8 100644 --- a/pygit2/__init__.py +++ b/pygit2/__init__.py @@ -56,16 +56,27 @@ def clone_repository( """ Clones a new Git repository from *url* in the given *path*. - * **bare** indicates whether a bare git repository should be created. - * **remote_name** is the name given to the "origin" remote. The default is "origin". - * **push_url** is a URL to be used for pushing. None means use the *url* parameter. - * **fetch_spec** defines the the default fetch spec. 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*. + **bare** indicates whether a bare git repository should be created. + + **remote_name** is the name given to the "origin" remote. + The default is "origin". + + **push_url** is a URL to be used for pushing. + None means use the *url* parameter. + + **fetch_spec** defines the the default fetch spec. + 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*. Returns a Repository class pointing to the newly cloned repository. - If you wish to use the repo, you need to do a checkout for one of the available branches, like this: + If you wish to use the repo, you need to do a checkout for one of + the available branches, like this: >>> repo = repo.clone_repository("url", "path") >>> repo.checkout(branch) # i.e.: refs/heads/master diff --git a/src/pygit2.c b/src/pygit2.c index ed1ad9d..d062a9e 100644 --- a/src/pygit2.c +++ b/src/pygit2.c @@ -98,9 +98,11 @@ init_repository(PyObject *self, PyObject *args) { }; PyDoc_STRVAR(clone_repository__doc__, - "clone_repository(url, path, bare, remote_name, push_url, fetch_spec, push_spec, checkout_branch)\n" + "clone_repository(url, path, bare, remote_name, push_url," + "fetch_spec, push_spec, checkout_branch)\n" "\n" - "Clones a Git repository in the given url to the given path with the specified options.\n" + "Clones a Git repository in the given url to the given path " + "with the specified options.\n" "\n" "Arguments:\n" "\n" @@ -115,11 +117,14 @@ PyDoc_STRVAR(clone_repository__doc__, "push_url\n" " URL to be used for pushing.\n" "fetch_spec\n" - " The fetch specification to be used for fetching. None results in the same behavior as GIT_REMOTE_DEFAULT_FETCH.\n" + " The fetch specification to be used for fetching. None results in " + "the same behavior as GIT_REMOTE_DEFAULT_FETCH.\n" "push_spec\n" - " The fetch specification to be used for pushing. None means use the same spec as for 'fetch_spec'\n" + " The fetch specification to be used for pushing. None means use the " + "same spec as for 'fetch_spec'\n" "checkout_branch\n" - " The name of the branch to checkout. None means use the remote's HEAD.\n"); + " The name of the branch to checkout. None means use the remote's " + "HEAD.\n"); PyObject * @@ -131,7 +136,9 @@ clone_repository(PyObject *self, PyObject *args) { const char *remote_name, *push_url, *fetch_spec, *push_spec, *checkout_branch; int err; - if (!PyArg_ParseTuple(args, "zzIzzzzz", &url, &path, &bare, &remote_name, &push_url, &fetch_spec, &push_spec, &checkout_branch)) + if (!PyArg_ParseTuple(args, "zzIzzzzz", + &url, &path, &bare, &remote_name, &push_url, + &fetch_spec, &push_spec, &checkout_branch)) return NULL; git_clone_options opts = {