From a92ab8028c7780db728d6aad40ea1f511945fc8e Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Mon, 4 Jul 2011 23:12:25 +0200 Subject: Basic remote functionality moved to Reference type, as it can in fact be useful for tags as well, which might end up somewhere in the refs/remotes space. Its not likely that it will ever be used on a pure Reference instance though, but it is the smallest common base --- git/refs/remote.py | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) (limited to 'git/refs/remote.py') diff --git a/git/refs/remote.py b/git/refs/remote.py index b7b07d4b..1d45d23f 100644 --- a/git/refs/remote.py +++ b/git/refs/remote.py @@ -10,7 +10,7 @@ __all__ = ["RemoteReference"] class RemoteReference(Head): """Represents a reference pointing to a remote head.""" - _common_path_default = "refs/remotes" + _common_path_default = Head._remote_common_path_default @classmethod @@ -22,24 +22,6 @@ class RemoteReference(Head): # END handle remote constraint return super(RemoteReference, cls).iter_items(repo, common_path) - @property - def remote_name(self): - """ - :return: - Name of the remote we are a reference of, such as 'origin' for a reference - named 'origin/master'""" - tokens = self.path.split('/') - # /refs/remotes// - return tokens[2] - - @property - def remote_head(self): - """:return: Name of the remote head itself, i.e. master. - :note: The returned name is usually not qualified enough to uniquely identify - a branch""" - tokens = self.path.split('/') - return '/'.join(tokens[3:]) - @classmethod def delete(cls, repo, *refs, **kwargs): """Delete the given remote references. -- cgit v1.2.1