Skip to content

Commit 095013f

Browse files
committed
Fixed critical issue that would cause a string to be passed to methods that expect a stream
1 parent 74b13c5 commit 095013f

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

git/refs/log.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def __init__(self, filepath=None):
127127

128128
def _read_from_file(self):
129129
try:
130-
fmap = file_contents_ro_filepath(self._path, stream=False, allow_mmap=True)
130+
fmap = file_contents_ro_filepath(self._path, stream=True, allow_mmap=True)
131131
except OSError:
132132
# it is possible and allowed that the file doesn't exist !
133133
return

git/test/refs/test_reflog.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,7 @@ def test_base(self):
3434
tdir = tempfile.mktemp(suffix="test_reflogs")
3535
os.mkdir(tdir)
3636

37-
# verify we have a ref - with the creation of a new ref, the reflog
38-
# will be created as well
39-
rlp_master_ro = RefLog.path(self.rorepo.heads.master)
37+
rlp_master_ro = RefLog.path(self.rorepo.head)
4038
assert os.path.isfile(rlp_master_ro)
4139

4240
# simple read

0 commit comments

Comments
 (0)