Skip to content

Commit 180f654

Browse files
DrInfiniteExplorerMatthias Putz
authored andcommitted
Fix: handle crlf in GetHead correctly
Using strip() instead of manual last-character-removal.
1 parent 68cf1e6 commit 180f654

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

project.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2553,8 +2553,8 @@ def GetHead(self):
25532553
except AttributeError:
25542554
pass
25552555
if line.startswith('ref: '):
2556-
return line[5:-1]
2557-
return line[:-1]
2556+
return line[5:].strip()
2557+
return line.strip()
25582558

25592559
def SetHead(self, ref, message=None):
25602560
cmdv = []

0 commit comments

Comments
 (0)