diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2011-06-08 11:39:20 +0200 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2011-06-08 11:39:20 +0200 |
commit | 8828ced5818d793879ae509e144fdad23465d684 (patch) | |
tree | 5a3c8c6246c04e98778b66b8d891dd64c49659d2 | |
parent | a5a75ab7533de99a4f569b05535061581cb07a41 (diff) | |
download | gitpython-8828ced5818d793879ae509e144fdad23465d684.tar.gz |
Fixed critical issue that would cause a string to be passed to methods that expect a stream
-rw-r--r-- | git/refs/log.py | 2 | ||||
-rw-r--r-- | git/test/test_reflog.py | 4 |
2 files changed, 2 insertions, 4 deletions
diff --git a/git/refs/log.py b/git/refs/log.py index e94c21f0..0e977723 100644 --- a/git/refs/log.py +++ b/git/refs/log.py @@ -130,7 +130,7 @@ class RefLog(list, Serializable): def _read_from_file(self): try: - fmap = file_contents_ro_filepath(self._path, stream=False, allow_mmap=True) + fmap = file_contents_ro_filepath(self._path, stream=True, allow_mmap=True) except OSError: # it is possible and allowed that the file doesn't exist ! return diff --git a/git/test/test_reflog.py b/git/test/test_reflog.py index 3fdf1fae..0fc1f1ae 100644 --- a/git/test/test_reflog.py +++ b/git/test/test_reflog.py @@ -34,9 +34,7 @@ class TestRefLog(TestBase): tdir = tempfile.mktemp(suffix="test_reflogs") os.mkdir(tdir) - # verify we have a ref - with the creation of a new ref, the reflog - # will be created as well - rlp_master_ro = RefLog.path(self.rorepo.heads.master) + rlp_master_ro = RefLog.path(self.rorepo.head) assert os.path.isfile(rlp_master_ro) # simple read |