From c80d727e374321573bb00e23876a67c77ff466e3 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Sun, 4 Jan 2015 13:48:29 +0100 Subject: Bumped version, updated changelog, reduced code smell There is more work to do though, as many imports are still incorrect. Also, there are still print statements --- git/refs/symbolic.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'git/refs/symbolic.py') diff --git a/git/refs/symbolic.py b/git/refs/symbolic.py index 1e361244..2fa58d12 100644 --- a/git/refs/symbolic.py +++ b/git/refs/symbolic.py @@ -424,7 +424,7 @@ class SymbolicReference(object): # in the line # If we deleted the last line and this one is a tag-reference object, # we drop it as well - if ( line.startswith('#') or full_ref_path not in line ) and \ + if (line.startswith('#') or full_ref_path not in line) and \ (not dropped_last_line or dropped_last_line and not line.startswith('^')): new_lines.append(line) dropped_last_line = False @@ -623,6 +623,8 @@ class SymbolicReference(object): if not path: raise ValueError("Cannot create Reference from %r" % path) + # Names like HEAD are inserted after the refs module is imported - we have an import dependency + # cycle and don't want to import these names in-function for ref_type in (HEAD, Head, RemoteReference, TagReference, Reference, SymbolicReference): try: instance = ref_type(repo, path) -- cgit v1.2.1