From: Avery Pennarun Date: Mon, 4 Jan 2010 03:06:29 +0000 (-0500) Subject: Force generated pack indexes to be version 2. X-Git-Tag: bup-0.01~1 X-Git-Url: https://arthur.barton.de/gitweb/?a=commitdiff_plain;h=c2b6d36286ec0b39b306c5c5cb02d4dd3c913081;p=bup.git Force generated pack indexes to be version 2. We don't support parsing earlier versions, and the earlier versions are inferior anyway. --- diff --git a/git.py b/git.py index dc641ff..cd61eb8 100644 --- 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) diff --git a/t/tgit.py b/t/tgit.py index 49e754c..bb895d9 100644 --- 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))