From 814feeb2cd7597bf456cae418a3691f48ddb5a47 Mon Sep 17 00:00:00 2001 From: Jannis Pohlmann Date: Wed, 22 Feb 2012 18:23:33 +0000 Subject: Add an sed hack to avoid unrecognized headers in generated bundles. --- lorry | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'lorry') diff --git a/lorry b/lorry index 0b272df..10979d2 100755 --- a/lorry +++ b/lorry @@ -114,9 +114,23 @@ class Lorry(cliapp.Application): quote_url(bundlename)) + '.bndl' if not os.path.exists(path) or self.settings['bundle'] == 'always': self.progress('.. building bundle %s' % bundlename) + + # create the bundle self.run_program(['git', 'bundle', 'create', path, '--branches', '--tags'], cwd=gitdir) + # FIXME this is a hack to avoid unrecognized headers in bundles, + # which happens with some repositories. See + # + # http://marc.info/?l=git&m=132992959317420&w=2 + # + # for more information. From the bundle's header section, the + # expression below will remove all garbage lines that appear + # between the first line (the bundle format meta comment) and + # the list of refs. + expr = '1,/^[0-9a-f]\{40\}/{ /^[0-9a-f]\{40\}/!{/^[^#]/d}}' + self.run_program(['sed', '-i', '-e', expr, path], cwd=gitdir) + def gitify(self, name, spec): self.progress('Getting %s' % name) table = { -- cgit v1.2.1