# Re: Re: [PATCH] Add git-bundle - pack objects and references for disconnected transfer

4 messages from 2007-02-16 to 2007-02-16. Participants: Mark Levedahl, Simon 'corecode' Schubert, Johannes Schindelin.
Thread: https://gitlist.dev/t/6844

## Mark Levedahl, 2007-02-16 12:45

Subject: Re: Re: [PATCH] Add git-bundle - pack objects and references for disconnected transfer
Message-ID: <7238711.2657861171629916957.JavaMail.root@vms064.mailsrvcs.net>
URL: https://gitlist.dev/e/7238711.2657861171629916957.JavaMail.root%40vms064.mailsrvcs.net

```
>From: Simon 'corecode' Schubert <corecode@fs.ei.tum.de>
>Date: 2007/02/16 Fri AM 05:57:20 CST
>To: "Shawn O. Pearce" <spearce@spearce.org>
>Cc: Mark Levedahl <mdl123@verizon.net>, git@vger.kernel.org
>Subject: Re: [PATCH] Add git-bundle - pack objects and references for disconnected transfer

>Shawn O. Pearce wrote:
>> Mark Levedahl <mdl123@verizon.net> wrote:
>>> +# create the tar file, clean up
>>> +tar cf "$bfile" --absolute-names --transform="s,$tmp-,," \
>>> +    --verbose --show-transformed-names \
>>> +    "$references" "$pack"
>> 
>> I'm not sure this will work on FreeBSD.  Both 5.1 and 6.1 use tar
>> that does not know about --absolute-names, --transform, --verbose,
>> or --show-transformed-names.
>
>for portability, pax is the official choice :)  and it can even do path name modifications with -s.  but why again are we using tar there?  this data could easiliy be put in one mixed text/binary file, starting out with
>
>#!/bin/sh
>echo "This is a git bundle.  Use git-unbundle to process me." >&1
>exit
>### DATA ###
>
>or so
>
>cheers
>  simon

... I *tried* that, and it fails under Cygwin. Apparently cygwin's bash (or something) mangles data in the pipe (99% certain it will turn out to be a latent crlf issue)...


cat "$bfile" (
    read refs...
    git index-pack --stdin
)

worked several times, it only failed twice out of 8 bundles I tried. That's just a trifle bit too high a failure rate for my taste. ;^)

Mark

```

## Simon 'corecode' Schubert, 2007-02-16 13:25

Subject: Re: [PATCH] Add git-bundle - pack objects and references for disconnected transfer
Message-ID: <45D5B0C0.3040303@fs.ei.tum.de>
URL: https://gitlist.dev/e/45D5B0C0.3040303%40fs.ei.tum.de
In-Reply-To: <7238711.2657861171629916957.JavaMail.root@vms064.mailsrvcs.net>

```
Mark Levedahl wrote:
>> #!/bin/sh
>> echo "This is a git bundle.  Use git-unbundle to process me." >&1
>> exit
>> ### DATA ###
>>
>> or so
>>
>> cheers
>>  simon
> 
> ... I *tried* that, and it fails under Cygwin. Apparently cygwin's
> bash (or something) mangles data in the pipe (99% certain it will
> turn out to be a latent crlf issue)...

you can try something like:

sed -e '1,/^##DATA##$/d' "$bundle" | git-index-pack --stdin

and see if it works better.  no need to stream the bundle completely, it can be read several times.

cheers
  simon

-- 
Serve - BSD     +++  RENT this banner advert  +++    ASCII Ribbon   /"\
Work - Mac      +++  space for low €€€ NOW!1  +++      Campaign     \ /
Party Enjoy Relax   |   http://dragonflybsd.org      Against  HTML   \
Dude 2c 2 the max   !   http://golden-apple.biz       Mail + News   / \


```

## Johannes Schindelin, 2007-02-16 13:44

Subject: Re: Re: [PATCH] Add git-bundle - pack objects and references for disconnected transfer
Message-ID: <Pine.LNX.4.63.0702161443370.22628@wbgn013.biozentrum.uni-wuerzburg.de>
URL: https://gitlist.dev/e/Pine.LNX.4.63.0702161443370.22628%40wbgn013.biozentrum.uni-wuerzburg.de
In-Reply-To: <7238711.2657861171629916957.JavaMail.root@vms064.mailsrvcs.net>

```
Hi,

On Fri, 16 Feb 2007, Mark Levedahl wrote:

> ... I *tried* that, and it fails under Cygwin. Apparently cygwin's bash 
> (or something) mangles data in the pipe (99% certain it will turn out to 
> be a latent crlf issue)...

Have you tried

	export CYGWIN=binmode

before that? (If it works, you have to make sure that other settings as 
"ntsec" are retained in that environment variable, but not "nobinmode").

Hth,
Dscho

```

## Mark Levedahl, 2007-02-16 23:25

Subject: Re: [PATCH] Add git-bundle - pack objects and references for disconnected transfer
Message-ID: <45D63D7C.40205@verizon.net>
URL: https://gitlist.dev/e/45D63D7C.40205%40verizon.net
In-Reply-To: <Pine.LNX.4.63.0702161443370.22628@wbgn013.biozentrum.uni-wuerzburg.de>

```
Johannes Schindelin wrote:
> Hi,
>
> On Fri, 16 Feb 2007, Mark Levedahl wrote:
>
>   
>> ... I *tried* that, and it fails under Cygwin. Apparently cygwin's bash 
>> (or something) mangles data in the pipe (99% certain it will turn out to 
>> be a latent crlf issue)...
>>     
>
> Have you tried
>
> 	export CYGWIN=binmode
>
> before that? (If it works, you have to make sure that other settings as 
> "ntsec" are retained in that environment variable, but not "nobinmode").
>
> Hth,
> Dscho
In a word, yes. I tried many things with mount and CYGWIN, none fixed 
the problem. What I don't have is a simple test case I can push upstream 
to demonstrate the failure mode. However, if this is a crlf issue I 
suspect this would not work in msys either, regardless of being able to 
find the issue in Cygwin.

Mark

```
