]> arthur.barton.de Git - bup.git/commitdiff
cmd-join: don't restart git cat-file so frequently.
authorAvery Pennarun <apenwarr@gmail.com>
Fri, 12 Feb 2010 04:17:54 +0000 (23:17 -0500)
committerAvery Pennarun <apenwarr@gmail.com>
Fri, 12 Feb 2010 04:50:18 +0000 (23:50 -0500)
We would restart cat-file for every id passed on the command line or via
stdin, which was needlessly inefficient.

cmd-join.py

index 6ad32feb7bb294f36b2cea6bcea86b05ef60e21a..07dfdcd238b22eb551468aafcd855be1b4344c97 100755 (executable)
@@ -25,7 +25,8 @@ if opt.remote:
             sys.stdout.write(blob)
     cli.close()
 else:
+    cp = git.CatPipe()
     for id in extra:
         #log('id=%r\n' % id)
-        for blob in git.cat(id):
+        for blob in cp.join(id):
             sys.stdout.write(blob)