Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9f12b26

Browse files
authored
Merge pull requestgitpython-developers#736 from hugovk/fix-version-check
Allow mmap not just for py2.6, 2.7 and 3.6+ but also 3.0+
2 parents190c045 +693b171 commit9f12b26

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
importos
99
fromstatimportS_ISLNK
1010
importsubprocess
11-
importsys
1211
importtempfile
1312

1413
fromgit.compatimport (
@@ -18,7 +17,6 @@
1817
force_bytes,
1918
defenc,
2019
mviter,
21-
is_win
2220
)
2321
fromgit.excimport (
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_winorsys.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)

[8]ページ先頭

©2009-2025 Movatter.jp