]> arthur.barton.de Git - bup.git/blobdiff - lib/bup/git.py
gc: restart catpipe after each new pack
[bup.git] / lib / bup / git.py
index 0f701a5d623cb3090d36631595dbda33feb1bc4c..fc9eb39cb2c35ec8b9d0cc67c4f8b1cdd0b84e24 100644 (file)
@@ -1131,7 +1131,7 @@ class CatPipe:
         self.p = None
         self.inprogress = None
 
-    def _restart(self):
+    def restart(self):
         self._abort()
         self.p = subprocess.Popen(['git', 'cat-file', '--batch'],
                                   stdin=subprocess.PIPE,
@@ -1142,7 +1142,7 @@ class CatPipe:
 
     def _fast_get(self, id):
         if not self.p or self.p.poll() != None:
-            self._restart()
+            self.restart()
         assert(self.p)
         poll_result = self.p.poll()
         assert(poll_result == None)