Skip to content

Commit 693b171

Browse files
committed
Allow mmap not just for py2.6/2.7/3.6+ but also 3.0+
1 parent 190c045 commit 693b171

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

git/index/base.py

Lines changed: 1 addition & 9 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy