summaryrefslogtreecommitdiff
path: root/git/refs/symbolic.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2015-01-04 13:48:29 +0100
committerSebastian Thiel <byronimo@gmail.com>2015-01-04 13:48:29 +0100
commitc80d727e374321573bb00e23876a67c77ff466e3 (patch)
tree7590d6ae544eac56e83639d27e1f9013b38d8a4b /git/refs/symbolic.py
parent965a08c3f9f2fbd62691d533425c699c943cb865 (diff)
downloadgitpython-c80d727e374321573bb00e23876a67c77ff466e3.tar.gz
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
Diffstat (limited to 'git/refs/symbolic.py')
-rw-r--r--git/refs/symbolic.py4
1 files changed, 3 insertions, 1 deletions
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)