From f22ddca351c45edab9f71359765e34ae16205fa1 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Mon, 30 Nov 2009 11:28:15 +0100 Subject: SymbolicReference.delete: Now takes SymbolicReference instances as well, not only paths diff.__str__: fixed incorrect message generation error --- lib/git/refs.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/git/refs.py') diff --git a/lib/git/refs.py b/lib/git/refs.py index 208ce880..cf829cb6 100644 --- a/lib/git/refs.py +++ b/lib/git/refs.py @@ -236,6 +236,8 @@ class SymbolicReference(object): @classmethod def _to_full_path(cls, repo, path): + if isinstance(path, SymbolicReference): + path = path.path full_ref_path = path if not cls._common_path_default: return full_ref_path @@ -253,6 +255,7 @@ class SymbolicReference(object): ``path`` Short or full path pointing to the reference, i.e. refs/myreference or just "myreference", hence 'refs/' is implied. + Alternatively the symbolic reference to be deleted """ full_ref_path = cls._to_full_path(repo, path) abs_path = os.path.join(repo.path, full_ref_path) -- cgit v1.2.1