]> arthur.barton.de Git - bup.git/commitdiff
Force generated pack indexes to be version 2.
authorAvery Pennarun <apenwarr@gmail.com>
Mon, 4 Jan 2010 03:06:29 +0000 (22:06 -0500)
committerAvery Pennarun <apenwarr@gmail.com>
Mon, 4 Jan 2010 03:06:29 +0000 (22:06 -0500)
We don't support parsing earlier versions, and the earlier versions are
inferior anyway.

git.py
t/tgit.py

diff --git a/git.py b/git.py
index dc641ffb70cab4a7f65ebac1d52d83d9205ccc71..cd61eb8db21858d7d460445420728568d81df398 100644 (file)
--- a/git.py
+++ b/git.py
@@ -232,6 +232,7 @@ class PackWriter:
         f.close()
 
         p = subprocess.Popen(['git', 'index-pack', '-v',
+                              '--index-version=2',
                               self.filename + '.pack'],
                              preexec_fn = _gitenv,
                              stdout = subprocess.PIPE)
index 49e754ca33ebb677fabb2136da7849d0d5021725..bb895d97e80dddc17983e3fb8bf6cffb44f2e993 100644 (file)
--- a/t/tgit.py
+++ b/t/tgit.py
@@ -34,7 +34,7 @@ def testpacks():
 
     WVFAIL(r.find_offset('\0'*20))
 
-    r = git.MultiPackIndex('.git/objects/pack')
+    r = git.MultiPackIndex('pybuptest.tmp/objects/pack')
     WVPASS(r.exists(hashes[5]))
     WVPASS(r.exists(hashes[6]))
     WVFAIL(r.exists('\0'*20))