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

Commit55b67e8

Browse files
committed
Fixed python < 2.6 windows specific issue when reading in the index using a memory map. Its totally ridiculous, but fixed
1 parentde3b963 commit55b67e8

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

‎lib/git/index/base.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,13 @@ def _set_cache_(self, attr):
124124
return
125125
# END exception handling
126126

127-
stream=file_contents_ro(fd,stream=True,allow_mmap=True)
127+
# 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'orsys.version_info[1]>5)
133+
stream=file_contents_ro(fd,stream=True,allow_mmap=allow_mmap)
128134

129135
try:
130136
self._deserialize(stream)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp