summaryrefslogtreecommitdiff
path: root/git/remote.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2015-01-14 17:47:44 +0100
committerSebastian Thiel <byronimo@gmail.com>2015-01-14 17:49:33 +0100
commit6569c4849197c9475d85d05205c55e9ef28950c1 (patch)
tree3dfb25f7c23a74e466e43ab6db87eeb4290712a7 /git/remote.py
parent53e5fb3733e491925a01e9da6243e93c2e4214c1 (diff)
downloadgitpython-6569c4849197c9475d85d05205c55e9ef28950c1.tar.gz
Fixed some doc strings to build correctly with sphinx
Fixes #7 [ci skip]
Diffstat (limited to 'git/remote.py')
-rw-r--r--git/remote.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/git/remote.py b/git/remote.py
index 746a7819..541f3c9e 100644
--- a/git/remote.py
+++ b/git/remote.py
@@ -398,8 +398,9 @@ class Remote(LazyMixin, Iterable):
return hash(self.name)
def exists(self):
- """:return: True if this is a valid, existing remote.
- Valid remotes have an entry in the repository's configuration"""
+ """
+ :return: True if this is a valid, existing remote.
+ Valid remotes have an entry in the repository's configuration"""
try:
self.config_reader.get('url')
return True
@@ -429,7 +430,7 @@ class Remote(LazyMixin, Iterable):
:return:
IterableList of RemoteReference objects. It is prefixed, allowing
you to omit the remote path portion, i.e.::
- remote.refs.master # yields RemoteReference('/refs/remotes/origin/master')"""
+ remote.refs.master # yields RemoteReference('/refs/remotes/origin/master')"""
out_refs = IterableList(RemoteReference._id_attribute_, "%s/" % self.name)
out_refs.extend(RemoteReference.list_items(self.repo, remote=self.name))
assert out_refs, "Remote %s did not have any references" % self.name
@@ -463,11 +464,8 @@ class Remote(LazyMixin, Iterable):
:param repo: Repository instance that is to receive the new remote
:param name: Desired name of the remote
:param url: URL which corresponds to the remote's name
- :param kwargs:
- Additional arguments to be passed to the git-remote add command
-
+ :param kwargs: Additional arguments to be passed to the git-remote add command
:return: New Remote instance
-
:raise GitCommandError: in case an origin with that name already exists"""
repo.git.remote("add", name, url, **kwargs)
return cls(repo, name)