◐ Shell
reader mode source ↗
Skip to content
Merged
Changes from all commits
File filter
Conversations
Jump to
Diff view
Apply and reload
Show whitespace
Diff view
Apply and reload
10 changes: 1 addition & 9 deletions git/index/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import os
from stat import S_ISLNK
import subprocess
import sys
import tempfile

from git.compat import (
@@ -18,7 +17,6 @@
force_bytes,
defenc,
mviter,
is_win
)
from git.exc import (
GitCommandError,
Expand Down Expand Up @@ -128,13 +126,7 @@ def _set_cache_(self, attr):
lfd.rollback()
# END exception handling

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

try:
self._deserialize(stream)
Expand Down
Toggle all file notes Toggle all file annotations