|
@@ -77,7 +77,7 @@ BASE_DIRECTORIES = [
|
|
|
def read_info_refs(f):
|
|
|
ret = {}
|
|
|
for l in f.readlines():
|
|
|
- (sha, name) = l.rstrip("\n").split("\t", 1)
|
|
|
+ (sha, name) = l.rstrip("\r\n").split("\t", 1)
|
|
|
ret[name] = sha
|
|
|
return ret
|
|
|
|
|
@@ -394,7 +394,7 @@ class DiskRefsContainer(RefsContainer):
|
|
|
header = f.read(len(SYMREF))
|
|
|
if header == SYMREF:
|
|
|
# Read only the first line
|
|
|
- return header + iter(f).next().rstrip("\n")
|
|
|
+ return header + iter(f).next().rstrip("\r\n")
|
|
|
else:
|
|
|
# Read only the first 40 bytes
|
|
|
return header + f.read(40-len(SYMREF))
|
|
@@ -586,7 +586,7 @@ def read_packed_refs_with_peeled(f):
|
|
|
for l in f:
|
|
|
if l[0] == "#":
|
|
|
continue
|
|
|
- l = l.rstrip("\n")
|
|
|
+ l = l.rstrip("\r\n")
|
|
|
if l[0] == "^":
|
|
|
if not last:
|
|
|
raise PackedRefsException("unexpected peeled ref line")
|