From c2b6d36286ec0b39b306c5c5cb02d4dd3c913081 Mon Sep 17 00:00:00 2001 From: Avery Pennarun Date: Sun, 3 Jan 2010 22:06:29 -0500 Subject: [PATCH] Force generated pack indexes to be version 2. We don't support parsing earlier versions, and the earlier versions are inferior anyway. --- git.py | 1 + t/tgit.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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)) -- 2.39.2