We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent de3b963 commit 55b67e8Copy full SHA for 55b67e8
lib/git/index/base.py
@@ -124,7 +124,13 @@ def _set_cache_(self, attr):
124
return
125
# END exception handling
126
127
- stream = file_contents_ro(fd, stream=True, allow_mmap=True)
+ # Here it comes: on windows in python 2.5, memory maps aren't closed properly
128
+ # Hence we are in trouble if we try to delete a file that is memory mapped,
129
+ # which happens during read-tree.
130
+ # In this case, we will just read the memory in directly.
131
+ # Its insanely bad ... I am disappointed !
132
+ allow_mmap = (os.name != 'nt' or sys.version_info[1] > 5)
133
+ stream = file_contents_ro(fd, stream=True, allow_mmap=allow_mmap)
134
135
try:
136
self._deserialize(stream)
0 commit comments