From 6fc9e6150957ff5e011142ec5e9f8522168602ec Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Wed, 19 Nov 2014 11:01:49 +0100 Subject: Added SymbolicReference.is_remote() utility method. Based on the functionality proposed in https://github.com/gitpython-developers/GitPython/pull/101 [ci skip] --- git/refs/reference.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'git/refs/reference.py') 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 -- cgit v1.2.1