summaryrefslogtreecommitdiff
path: root/git/refs/reference.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2014-11-19 11:01:49 +0100
committerSebastian Thiel <byronimo@gmail.com>2014-11-19 11:02:03 +0100
commit6fc9e6150957ff5e011142ec5e9f8522168602ec (patch)
treeaff8a27f780da60dac5d0b899a9928711c7d15b5 /git/refs/reference.py
parent123cb67ea60d2ae2fb32b9b60ebfe69e43541662 (diff)
downloadgitpython-6fc9e6150957ff5e011142ec5e9f8522168602ec.tar.gz
Added SymbolicReference.is_remote() utility method.
Based on the functionality proposed in https://github.com/gitpython-developers/GitPython/pull/101 [ci skip]
Diffstat (limited to 'git/refs/reference.py')
-rw-r--r--git/refs/reference.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/git/refs/reference.py b/git/refs/reference.py
index 0745b721..72494e0a 100644
--- a/git/refs/reference.py
+++ b/git/refs/reference.py
@@ -18,7 +18,7 @@ def require_remote_ref_path(func):
"""A decorator raising a TypeError if we are not a valid remote, based on the path"""
def wrapper(self, *args):
- if not self.path.startswith(self._remote_common_path_default + "/"):
+ if not self.is_remote():
raise ValueError("ref path does not point to a remote reference: %s" % self.path)
return func(self, *args)
#END wrapper