summaryrefslogtreecommitdiff
path: root/git/remote.py
diff options
context:
space:
mode:
authorYobmod <yobmod@gmail.com>2021-07-09 15:49:32 +0100
committerYobmod <yobmod@gmail.com>2021-07-09 15:49:32 +0100
commite7b685db1bf4d9d6aa3f95f4df3fda5992dab14c (patch)
treea61d1565a93ab1598a9b58ac2ce2f19af15fb103 /git/remote.py
parentf916c148ea956655837a98817778abe685bf7ee7 (diff)
downloadgitpython-e7b685db1bf4d9d6aa3f95f4df3fda5992dab14c.tar.gz
Rmv Diffable assert, add Remoote.url property
Diffstat (limited to 'git/remote.py')
-rw-r--r--git/remote.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/git/remote.py b/git/remote.py
index 2998b987..3c3d3c48 100644
--- a/git/remote.py
+++ b/git/remote.py
@@ -559,6 +559,14 @@ class Remote(LazyMixin, IterableObj):
return self.set_url(url, delete=True)
@property
+ def url(self) -> Union[str, List[str]]:
+ url_list = list(self.urls)
+ if len(url_list) == 1:
+ return url_list[0]
+ else:
+ return url_list
+
+ @property
def urls(self) -> Iterator[str]:
""":return: Iterator yielding all configured URL targets on a remote as strings"""
try: