summaryrefslogtreecommitdiff
path: root/git/refs/symbolic.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/symbolic.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/symbolic.py')
-rw-r--r--git/refs/symbolic.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/git/refs/symbolic.py b/git/refs/symbolic.py
index 9a95b7f0..fcb1336e 100644
--- a/git/refs/symbolic.py
+++ b/git/refs/symbolic.py
@@ -630,3 +630,7 @@ class SymbolicReference(object):
# END exception handling
# END for each type to try
raise ValueError("Could not find reference type suitable to handle path %r" % path)
+
+ def is_remote(self):
+ """:return: True if this symbolic reference points to a remote branch"""
+ return self.path.startswith(self._remote_common_path_default + "/")