summaryrefslogtreecommitdiff
path: root/git/refs/reference.py
diff options
context:
space:
mode:
Diffstat (limited to 'git/refs/reference.py')
-rw-r--r--git/refs/reference.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/git/refs/reference.py b/git/refs/reference.py
index d8f0c70f..a8ecc95d 100644
--- a/git/refs/reference.py
+++ b/git/refs/reference.py
@@ -12,8 +12,11 @@ from gitdb.util import (
__all__ = ["Reference"]
#{ Utilities
+
+
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 + "/"):
raise ValueError("ref path does not point to a remote reference: %s" % self.path)
@@ -25,6 +28,7 @@ def require_remote_ref_path(func):
class Reference(SymbolicReference, LazyMixin, Iterable):
+
"""Represents a named reference to any object. Subclasses may apply restrictions though,
i.e. Heads can only point to commits."""
__slots__ = tuple()
@@ -45,7 +49,6 @@ class Reference(SymbolicReference, LazyMixin, Iterable):
raise ValueError("Cannot instantiate %r from path %s" % (self.__class__.__name__, path))
super(Reference, self).__init__(repo, path)
-
def __str__(self):
return self.name
@@ -99,7 +102,6 @@ class Reference(SymbolicReference, LazyMixin, Iterable):
#}END interface
-
#{ Remote Interface
@property