git.samba.org
/
jelmer
/
dulwich.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e4a3bf0
)
Fix leak when pack cache is rebuilt.
author
Damien Tournoud
<damien@commerceguys.com>
Thu, 17 Apr 2014 08:29:04 +0000
(10:29 +0200)
committer
Damien Tournoud
<damien@commerceguys.com>
Thu, 17 Apr 2014 08:31:18 +0000
(10:31 +0200)
dulwich/object_store.py
patch
|
blob
|
history
diff --git
a/dulwich/object_store.py
b/dulwich/object_store.py
index a6e15662a8a1478a622f8d4c7f9001ff19676678..bb3117a06ffcb4c6296661ed8ccbc7c54acfbf71 100644
(file)
--- a/
dulwich/object_store.py
+++ b/
dulwich/object_store.py
@@
-303,7
+303,10
@@
class PackBasedObjectStore(BaseObjectStore):
@property
def packs(self):
"""List with pack objects."""
- if self._pack_cache is None or self._pack_cache_stale():
+ if self._pack_cache is not None and self._pack_cache_stale():
+ self.close()
+
+ if self._pack_cache is None:
self._pack_cache = self._load_packs()
return self._pack_cache