# Problem with git bundle creation

2 messages from 2010-10-13 to 2010-10-15. Participants: Kris Shannon, Jonathan Nieder.
Thread: https://gitlist.dev/t/25434

## Kris Shannon, 2010-10-13 01:58

Subject: Problem with git bundle creation
Message-ID: <AANLkTimsMgsuiS4iT2z_ggD8t0V9xj7ezwxRHk9WgaOw@mail.gmail.com>
URL: https://gitlist.dev/e/AANLkTimsMgsuiS4iT2z_ggD8t0V9xj7ezwxRHk9WgaOw%40mail.gmail.com

```
git clone git://github.com/freenet/fred-official.git
git bundle create bad.gitbundle -1 build01194
head -2 bad.gitbundle

Problem manifested by a commit message which happens to have a hyphen
in just the wrong place such that git rev-list --boundary
--pretty=oneline has a line which exceeds the 1024 buffer limit that
git bundle is using for reading and happens to read in the rest of the
commit messsage as a boundary commit.

git bundle should probably be checking that the fgets buffer actually
ends in a newline and if it doesn't then slurp in more until it does
(probably discarding it in the process)

```

## Jonathan Nieder, 2010-10-15 16:52

Subject: Re: Problem with git bundle creation
Message-ID: <20101015165256.GB10204@burratino>
URL: https://gitlist.dev/e/20101015165256.GB10204%40burratino
In-Reply-To: <AANLkTimsMgsuiS4iT2z_ggD8t0V9xj7ezwxRHk9WgaOw@mail.gmail.com>

```
Kris Shannon wrote:

> git clone git://github.com/freenet/fred-official.git
> git bundle create bad.gitbundle -1 build01194
> head -2 bad.gitbundle
> 
> Problem manifested by a commit message which happens to have a hyphen
> in just the wrong place such that git rev-list --boundary
> --pretty=oneline has a line which exceeds the 1024 buffer limit that
> git bundle is using for reading and happens to read in the rest of the
> commit messsage as a boundary commit.
> 
> git bundle should probably be checking that the fgets buffer actually
> ends in a newline and if it doesn't then slurp in more until it does
> (probably discarding it in the process)

Sounds like you've tracked down the problem.  Care to write a patch?
(Even a placeholder that die()s would be helpful if you don't have
time for the full proposed fix.)

Thanks for reporting.
Jonathan

```
