{"thread":{"id":"29694","subject":"Problems with unrecognized headers in git bundles","startedAt":"2012-02-22T16:05:45Z","lastAt":"2012-02-23T13:27:18Z","messageCount":4,"participants":["Jannis Pohlmann","Øyvind A. Holm","Erik Faye-Lund"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"185183","messageId":"4F451259.7010304@codethink.co.uk","threadId":"29694","inReplyTo":null,"subject":"Problems with unrecognized headers in git bundles","fromName":"Jannis Pohlmann","fromEmail":"jannis.pohlmann@codethink.co.uk","sentAt":"2012-02-22T16:05:45Z","receivedAt":"2012-02-22T16:05:45Z","isPatch":false,"sender":{"key":"jannis.pohlmann@codethink.co.uk","avatar":null},"body":"Hi,\n\ncreating bundles from some repositories seems to lead to bundles with \nincorrectly formatted headers, at least with git >= 1.7.2. When cloning \nfrom such bundles, git prints the following error/warning:\n\n   $ git clone perl-clone.bundle perl-clone\n   Cloning into 'perl-clone'...\n   warning: unrecognized header: --work around mangled archname on...\n\nThis can be reproduced easily with git from any version >= 1.7.2 or from \nmaster, using the following steps:\n\n   git clone git://perl5.git.perl.org/perl.git perl\n   GIT_DIR=perl/.git git bundle create perl-clone.bundle --all\n   git clone perl-clone.bundle perl-clone\n\nThe content of the bundle is:\n\n   # v2 git bundle\n   -- work around mangled archname on win32 while finding...\n   39ec54a59ce332fc44e553f4e5eeceef88e8369e refs/heads/blead\n   39ec54a59ce332fc44e553f4e5eeceef88e8369e refs/remotes/origin/HEAD\n   ...\n\nThe \"--work around mangled archname...\" line is rather long, so I've \nomitted most of it. What it contains is a series of commit messages all \ncombined into a single line. It appears that this line is the problem \nbecause it's neither a comment (like '#v2 git bundle') nor a SHA1 \nfollowed by a ref name.\n\nNote that this problem does not occur with all repositories. A bundle \ncreated from a test repository with a single text file and just one \ncommit does not have this problem.\n\nNote also that \"git clone <bundle> <dest>\" does not fail with corrupted \nbundles if the git version is something like 1.7.2 or 1.7.7.6. Those \nversion print the above warning but still succeed in cloning. \"git \nclone\" from master however treats this as an error and fails.\n\nWithout any knowledge of how git works internally, I would assume that \nthis is either a bug in how bundles are created, or a hint at a slightly \nbroken perl repository (other's have the same thing though, perhaps it \nis because of a conversion from another SCM software to git in the \npast). Does this sound reasonable?\n\nIs there a way to work around this or fix it properly? I'm not sure what \nlead to the decision to no longer ignore unrecognized headers in git \nmaster, would it be sensible to revert this change if nothing can be \ndone to solve this during bundle creation?\n\n   - Jannis\n"},{"id":"185194","messageId":"CAA787rm4c1zYgQJ3kP5=ujpEK1Dda9+h_P3BBmg2yX2eZca=TA@mail.gmail.com","threadId":"29694","inReplyTo":"4F451259.7010304@codethink.co.uk","subject":"Re: Problems with unrecognized headers in git bundles","fromName":"Øyvind A. Holm","fromEmail":"sunny@sunbase.org","sentAt":"2012-02-22T20:25:36Z","receivedAt":"2012-02-22T20:25:36Z","isPatch":false,"sender":{"key":"sunny@sunbase.org","avatar":"https://avatars.githubusercontent.com/u/113445?v=4"},"body":"On 22 February 2012 17:05, Jannis Pohlmann wrote:\n> Hi,\n>\n> creating bundles from some repositories seems to lead to bundles with\n> incorrectly formatted headers, at least with git >= 1.7.2. When\n> cloning from such bundles, git prints the following error/warning:\n>\n>  $ git clone perl-clone.bundle perl-clone\n>  Cloning into 'perl-clone'...\n>  warning: unrecognized header: --work around mangled archname on...\n>\n> This can be reproduced easily with git from any version >= 1.7.2 or\n> from master, using the following steps:\n>\n>  git clone git://perl5.git.perl.org/perl.git perl\n>  GIT_DIR=perl/.git git bundle create perl-clone.bundle --all\n>  git clone perl-clone.bundle perl-clone\n>\n> The content of the bundle is:\n>\n>  # v2 git bundle\n>  -- work around mangled archname on win32 while finding...\n>  39ec54a59ce332fc44e553f4e5eeceef88e8369e refs/heads/blead\n>  39ec54a59ce332fc44e553f4e5eeceef88e8369e refs/remotes/origin/HEAD\n\nHave researched this a bit, and I've found that all git versions back to\nwhen git-bundle was introduced (around v1.5.4) produces the same invalid\nline. The culprit is commit 3e8148feadabd0d0b1869fcc4d218a6475a5b0bc in\nperl.git, branch 'maint-5.005'. The log message of that commit contains\nemail headers, maybe that's the reason git bundle gets confused?\n\n        Øyvind\n"},{"id":"185197","messageId":"CAA787r=J_GVcusCXQHsu4Tc=k=oc=NZ9JE0x4JaOdn61wLijbg@mail.gmail.com","threadId":"29694","inReplyTo":"CAA787rm4c1zYgQJ3kP5=ujpEK1Dda9+h_P3BBmg2yX2eZca=TA@mail.gmail.com","subject":"Re: Problems with unrecognized headers in git bundles","fromName":"Øyvind A. Holm","fromEmail":"sunny@sunbase.org","sentAt":"2012-02-22T20:40:47Z","receivedAt":"2012-02-22T20:40:47Z","isPatch":false,"sender":{"key":"sunny@sunbase.org","avatar":"https://avatars.githubusercontent.com/u/113445?v=4"},"body":"On 22 February 2012 21:25, Øyvind A. Holm <sunny@sunbase.org> wrote:\n> On 22 February 2012 17:05, Jannis Pohlmann wrote:\n> > creating bundles from some repositories seems to lead to bundles\n> > with incorrectly formatted headers, at least with git >= 1.7.2. When\n> > cloning from such bundles, git prints the following error/warning:\n> >\n> >  $ git clone perl-clone.bundle perl-clone\n> >  Cloning into 'perl-clone'...\n> >  warning: unrecognized header: --work around mangled archname on...\n>\n> Have researched this a bit, and I've found that all git versions back\n> to when git-bundle was introduced (around v1.5.4) produces the same\n> invalid line. The culprit is commit\n> 3e8148feadabd0d0b1869fcc4d218a6475a5b0bc in perl.git, branch\n> 'maint-5.005'. The log message of that commit contains email headers,\n> maybe that's the reason git bundle gets confused?\n\n...or maybe because the log message doesn't contain any empty lines, so\nthey're joined together into an insanely long line. I've seen this\nbehaviour before, in git-am or git-apply, I think. Anyway, when the\nbundle doesn't contain this commit, the line is not present.\n\n  Øyvind\n"},{"id":"185274","messageId":"CABPQNSZyNTnXOO=YxUfEQKv3UbiuufWvi9-3ZvdOAqwQ=aAj+w@mail.gmail.com","threadId":"29694","inReplyTo":"CAA787rm4c1zYgQJ3kP5=ujpEK1Dda9+h_P3BBmg2yX2eZca=TA@mail.gmail.com","subject":"Re: Problems with unrecognized headers in git bundles","fromName":"Erik Faye-Lund","fromEmail":"kusmabite@gmail.com","sentAt":"2012-02-23T13:27:18Z","receivedAt":"2012-02-23T13:27:18Z","isPatch":false,"sender":{"key":"kusmabite@gmail.com","avatar":"https://avatars.githubusercontent.com/u/47073?v=4"},"body":"On Wed, Feb 22, 2012 at 9:25 PM, Øyvind A. Holm <sunny@sunbase.org> wrote:\n> On 22 February 2012 17:05, Jannis Pohlmann wrote:\n>> Hi,\n>>\n>> creating bundles from some repositories seems to lead to bundles with\n>> incorrectly formatted headers, at least with git >= 1.7.2. When\n>> cloning from such bundles, git prints the following error/warning:\n>>\n>>  $ git clone perl-clone.bundle perl-clone\n>>  Cloning into 'perl-clone'...\n>>  warning: unrecognized header: --work around mangled archname on...\n>>\n>> This can be reproduced easily with git from any version >= 1.7.2 or\n>> from master, using the following steps:\n>>\n>>  git clone git://perl5.git.perl.org/perl.git perl\n>>  GIT_DIR=perl/.git git bundle create perl-clone.bundle --all\n>>  git clone perl-clone.bundle perl-clone\n>>\n>> The content of the bundle is:\n>>\n>>  # v2 git bundle\n>>  -- work around mangled archname on win32 while finding...\n>>  39ec54a59ce332fc44e553f4e5eeceef88e8369e refs/heads/blead\n>>  39ec54a59ce332fc44e553f4e5eeceef88e8369e refs/remotes/origin/HEAD\n>\n> Have researched this a bit, and I've found that all git versions back to\n> when git-bundle was introduced (around v1.5.4) produces the same invalid\n> line. The culprit is commit 3e8148feadabd0d0b1869fcc4d218a6475a5b0bc in\n> perl.git, branch 'maint-5.005'. The log message of that commit contains\n> email headers, maybe that's the reason git bundle gets confused?\n\nFor the lazy, the commit can be found here:\n\nhttp://perl5.git.perl.org/perl.git/commit/3e8148feadabd0d0b1869fcc4d218a6475a5b0bc\n"}]}