Skip to content

Commit 9f12b26

Browse files
authored
Merge pull request #736 from hugovk/fix-version-check
Allow mmap not just for py2.6, 2.7 and 3.6+ but also 3.0+
2 parents 190c045 + 693b171 commit 9f12b26

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

Diff for: git/index/base.py

+1-9
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
import os
99
from stat import S_ISLNK
1010
import subprocess
11-
import sys
1211
import tempfile
1312

1413
from git.compat import (
@@ -18,7 +17,6 @@
1817
force_bytes,
1918
defenc,
2019
mviter,
21-
is_win
2220
)
2321
from git.exc import (
2422
GitCommandError,
@@ -128,13 +126,7 @@ def _set_cache_(self, attr):
128126
lfd.rollback()
129127
# END exception handling
130128

131-
# Here it comes: on windows in python 2.5, memory maps aren't closed properly
132-
# Hence we are in trouble if we try to delete a file that is memory mapped,
133-
# which happens during read-tree.
134-
# In this case, we will just read the memory in directly.
135-
# Its insanely bad ... I am disappointed !
136-
allow_mmap = (is_win or sys.version_info[1] > 5)
137-
stream = file_contents_ro(fd, stream=True, allow_mmap=allow_mmap)
129+
stream = file_contents_ro(fd, stream=True, allow_mmap=True)
138130

139131
try:
140132
self._deserialize(stream)

0 commit comments

Comments
 (0)