esrlabs/git-repo

branch parsing does not take under consideration windows line endings in Project.GetHead

amirhadar opened this issue · 3 comments

In Project.py the function GetHead returns line[:-1]
which suppose to get rid of the \n however in windows the line ending might be \r\n which cause the \r to remain in the branch name.

need to be changed to use strip().

Regards
Amir Hadar

+1 It would certainly resolve the problem I'm seeing using Jenkins, repo and windows

The line 'return line[5:-1]' needs strip() as well.

Merged, many thanks for your help on this !