# Re: reexporting git repository via git-daemon

7 messages from 2006-12-08 to 2006-12-10. Participants: Arkadiusz Miskiewicz, Junio C Hamano, Jakub Narebski, Robin Rosenberg.
Thread: https://gitlist.dev/t/43060

## Arkadiusz Miskiewicz, 2006-12-08 21:12

Subject: reexporting git repository via git-daemon
Message-ID: <200612082212.09682.arekm@maven.pl>
URL: https://gitlist.dev/e/200612082212.09682.arekm%40maven.pl

```

Hi,

I have weird problem wit git (1.4.4.2).

 git --bare clone git://git.kernel.org/pub/scm/git/git.git
fetches everything correctly;

$ cd /tmp
$ git clone /gitroot/home/gitrepo/git
remote: Generating pack...
remote: Done counting 33527 objects.
remote: Deltifying 33527 objects.
remote:  100% (33527/33527) done
Indexing 33527 objects.
remote: Total 33527, written 33527 (delta 23162), reused 33527 (delta 23162)
 100% (33527/33527) done
Resolving 23162 deltas.
 100% (23162/23162) done
Checking files out...
 100% (743/743) done
$

also correctly fetched. The problem begins with exporting that cloned repo 
once again via git-daemon:

$ git clone git://git.my-server/git
fatal: unexpected EOF
fetch-pack from 'git://git.my-server/git' failed.

strace on git-daemon side:
[...]
18241 lstat("refs/tags/v1.4.1-rc2", {st_mode=S_IFREG|0644, st_size=41, ...}) = 
0
18241 open("refs/tags/v1.4.1-rc2", O_RDONLY) = 7
18241 read(7, "33c9db007159db11c1ad5fa7101ea95853740acf\n", 255) = 41
18241 close(7)                          = 0
18241 write(1, "004233c9db007159db11c1ad5fa7101ea95853740acf 
refs/tags/v1.4.1-rc2\n", 66) = 66
18241 write(1, "0045abc02670169cee9541793a86324a014272ca8ed5 
refs/tags/v1.4.1-rc2^{}\n", 69) = 69
18241 stat("refs/tags/v1.4.1.1", {st_mode=S_IFREG|0644, st_size=41, ...}) = 0
18241 lstat("refs/tags/v1.4.1.1", {st_mode=S_IFREG|0644, st_size=41, ...}) = 0
18241 open("refs/tags/v1.4.1.1", O_RDONLY) = 7
18241 read(7, "8419a453dc088b25b63ab1746d3d7e679caf686d\n", 255) = 41
18241 close(7)  
18241 write(1, "00408419a453dc088b25b63ab1746d3d7e679caf686d 
refs/tags/v1.4.1.1\n", 64) = 64
18241 write(2, "fatal: ", 7)            = 7
18241 write(2, "corrupted pack 
file ./objects/pack/pack-0bb22295a585ac173504a2f8dfb3e31e074a8715.pack", 85) 
= 85
18241 write(2, "\n", 1)   

100% repeatable at this moment. Any ideas?

ps. verification for initial  git://git.kernel.org/pub/scm/git/git.git clone:
git]$ git --bare fsck-objects
fatal: Not a git repository: '/gitroot/home/gitrepo/git'
git]$ git fsck-objects
git]$
 
-- 
Arkadiusz Miśkiewicz        PLD/Linux Team

```

## Arkadiusz Miskiewicz, 2006-12-10 16:42

Subject: Re: reexporting git repository via git-daemon
Message-ID: <200612101742.44564.arekm@maven.pl>
URL: https://gitlist.dev/e/200612101742.44564.arekm%40maven.pl
In-Reply-To: <200612082212.09682.arekm@maven.pl>

```
On Friday 08 December 2006 22:12, Arkadiusz Miskiewicz wrote:

> strace on git-daemon side:
> [...]
> 18241 lstat("refs/tags/v1.4.1-rc2", {st_mode=S_IFREG|0644, st_size=41,
> ...}) = 0
> 18241 open("refs/tags/v1.4.1-rc2", O_RDONLY) = 7
> 18241 read(7, "33c9db007159db11c1ad5fa7101ea95853740acf\n", 255) = 41
> 18241 close(7)                          = 0
> 18241 write(1, "004233c9db007159db11c1ad5fa7101ea95853740acf
> refs/tags/v1.4.1-rc2\n", 66) = 66
> 18241 write(1, "0045abc02670169cee9541793a86324a014272ca8ed5
> refs/tags/v1.4.1-rc2^{}\n", 69) = 69
> 18241 stat("refs/tags/v1.4.1.1", {st_mode=S_IFREG|0644, st_size=41, ...}) =
> 0 18241 lstat("refs/tags/v1.4.1.1", {st_mode=S_IFREG|0644, st_size=41,
> ...}) = 0 18241 open("refs/tags/v1.4.1.1", O_RDONLY) = 7
> 18241 read(7, "8419a453dc088b25b63ab1746d3d7e679caf686d\n", 255) = 41
> 18241 close(7)
> 18241 write(1, "00408419a453dc088b25b63ab1746d3d7e679caf686d
> refs/tags/v1.4.1.1\n", 64) = 64
> 18241 write(2, "fatal: ", 7)            = 7
> 18241 write(2, "corrupted pack
> file ./objects/pack/pack-0bb22295a585ac173504a2f8dfb3e31e074a8715.pack",
> 85) = 85
> 18241 write(2, "\n", 1)
>
> 100% repeatable at this moment. Any ideas?

after:
$  git repack -a -d
Generating pack...
Done counting 33587 objects.
Deltifying 33587 objects.
 100% (33587/33587) done
Writing 33587 objects.
 100% (33587/33587) done
Total 33587, written 33587 (delta 23205), reused 33587 (delta 23205)
Pack pack-bc830a5d1c2efa3b727ef9af8faba13c3e719395 created.

the problem disapears and I can safely reexport git repository.

Does anyone care about this bug in git?

-- 
Arkadiusz Miśkiewicz        PLD/Linux Team

```

## Robin Rosenberg, 2006-12-10 17:22

Subject: Re: reexporting git repository via git-daemon
Message-ID: <200612101822.09385.robin.rosenberg.lists@dewire.com>
URL: https://gitlist.dev/e/200612101822.09385.robin.rosenberg.lists%40dewire.com
In-Reply-To: <200612082212.09682.arekm@maven.pl>

```
fredag 08 december 2006 22:12 skrev Arkadiusz Miskiewicz:
> Hi,
>
> I have weird problem wit git (1.4.4.2).
>
>  git --bare clone git://git.kernel.org/pub/scm/git/git.git
> fetches everything correctly;

You proably ment git clone --bare git://git.kernel.org/pub/scm/git/git.git

Maybe git shouldn't accept useless (in this case) options.


```

## Arkadiusz Miskiewicz, 2006-12-10 17:28

Subject: Re: reexporting git repository via git-daemon
Message-ID: <200612101828.38165.arekm@maven.pl>
URL: https://gitlist.dev/e/200612101828.38165.arekm%40maven.pl
In-Reply-To: <200612101822.09385.robin.rosenberg.lists@dewire.com>

```
On Sunday 10 December 2006 18:22, Robin Rosenberg wrote:
> fredag 08 december 2006 22:12 skrev Arkadiusz Miskiewicz:
> > Hi,
> >
> > I have weird problem wit git (1.4.4.2).
> >
> >  git --bare clone git://git.kernel.org/pub/scm/git/git.git
> > fetches everything correctly;
>
> You proably ment git clone --bare git://git.kernel.org/pub/scm/git/git.git

Tested - result is the same, git-damon strace:
[pid  6686] write(1, "00408419a453dc088b25b63ab1746d3d7e679caf686d 
refs/tags/v1.4.1.1\n", 64) = 64
[pid  6686] write(2, "fatal: ", 7)      = 7
[pid  6686] write(2, "corrupted pack 
file ./objects/pack/pack-bc830a5d1c2efa3b727ef9af8faba13c3e719395.pack", 85) 
= 85
[pid  6686] write(2, "\n", 1)           = 1


> Maybe git shouldn't accept useless (in this case) options.
Options handling in git* is a nightmare. It accepts non-existant options. You 
never know if the option is fine, missplaced or ignored :/

> -- robin

-- 
Arkadiusz Miśkiewicz        PLD/Linux Team

```

## Jakub Narebski, 2006-12-10 17:35

Subject: Re: reexporting git repository via git-daemon
Message-ID: <elhgcf$m4r$1@sea.gmane.org>
URL: https://gitlist.dev/e/elhgcf%24m4r%241%40sea.gmane.org
In-Reply-To: <200612082212.09682.arekm@maven.pl>

```
Arkadiusz Miskiewicz wrote:

> I have weird problem wit git (1.4.4.2).

I have tried to reproduce this error, but no luck.
 
> $ git --bare clone git://git.kernel.org/pub/scm/git/git.git
> fetches everything correctly;

It should be "git clone --bare git://git.kernel.org/pub/scm/git/git.git"
or "git clone --bare git://git.kernel.org/pub/scm/git/git.git git.git"
Git doesn't need GIT_DIR for clone.

> $ cd /tmp
> $ git clone /gitroot/home/gitrepo/git
> 
> also correctly fetched. The problem begins with exporting that cloned repo 
> once again via git-daemon:

I didn't do this second cloning, but it should not matter I think.

> $ git clone git://git.my-server/git
> fatal: unexpected EOF
> fetch-pack from 'git://git.my-server/git' failed.

True, the error messages of git-clone are bit cryptic and doesn't
give us much information. Does there exist such repository? Perhaps
it is not exported? Were there any error?

> strace on git-daemon side:
> [...]
> 18241 lstat("refs/tags/v1.4.1-rc2", {st_mode=S_IFREG|0644, st_size=41, ...}) = 
> 0
> 18241 open("refs/tags/v1.4.1-rc2", O_RDONLY) = 7
> 18241 read(7, "33c9db007159db11c1ad5fa7101ea95853740acf\n", 255) = 41
> 18241 close(7)                          = 0
> 18241 write(1, "004233c9db007159db11c1ad5fa7101ea95853740acf 
> refs/tags/v1.4.1-rc2\n", 66) = 66
> 18241 write(1, "0045abc02670169cee9541793a86324a014272ca8ed5 
> refs/tags/v1.4.1-rc2^{}\n", 69) = 69
> 18241 stat("refs/tags/v1.4.1.1", {st_mode=S_IFREG|0644, st_size=41, ...}) = 0
> 18241 lstat("refs/tags/v1.4.1.1", {st_mode=S_IFREG|0644, st_size=41, ...}) = 0
> 18241 open("refs/tags/v1.4.1.1", O_RDONLY) = 7
> 18241 read(7, "8419a453dc088b25b63ab1746d3d7e679caf686d\n", 255) = 41
> 18241 close(7)  
> 18241 write(1, "00408419a453dc088b25b63ab1746d3d7e679caf686d 
> refs/tags/v1.4.1.1\n", 64) = 64
> 18241 write(2, "fatal: ", 7)            = 7
> 18241 write(2, "corrupted pack 
> file ./objects/pack/pack-0bb22295a585ac173504a2f8dfb3e31e074a8715.pack", 85) 
> = 85
> 18241 write(2, "\n", 1)   
> 
> 100% repeatable at this moment. Any ideas?

WORKSFORME

$ git --version
git version 1.4.4.1

$ git clone --bare git://git.kernel.org/pub/scm/git/git.git
remote: Generating pack...
remote: Done counting 33587 objects.
remote: Deltifying 33587 objects.
remote:  100% (33587/33587) done
Indexing 33587 objects.
remote: Total 33587, written 33587 (delta 23205), reused 33325 (delta 23034)
 100% (33587/33587) done
Resolving 23205 deltas.
 100% (23205/23205) done

By the way, I wonder why git-clone names bare repository 'git',
and not 'git.git' as, I think, it should?

$ git-daemon --verbose --export-all --base-path=<pwd>
[31823] Connection from 127.0.0.1:46736
[31823] Extended attributes (16 bytes) exist <host=localhost>
[31823] Request upload-pack for '/git.git'
[31823] Disconnected

The above is generated when I was cloning locally, i.e. when I run the
following command:

$ git clone git://localhost/git.git
remote: Generating pack...
remote: Done counting 33587 objects.
remote: Deltifying 33587 objects.
remote:  100% (33587/33587) done
Indexing 33587 objects.
remote: Total 33587, written 33587 (delta 23205), reused 33587 (delta 23205)
 100% (33587/33587) done
Resolving 23205 deltas.
 100% (23205/23205) done
Checking files out...
 100% (743/743) done

which went without any problem.

P.S. Please reply also to git mailing list
-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git


```

## Arkadiusz Miskiewicz, 2006-12-10 17:43

Subject: Re: reexporting git repository via git-daemon
Message-ID: <200612101843.45941.arekm@maven.pl>
URL: https://gitlist.dev/e/200612101843.45941.arekm%40maven.pl
In-Reply-To: <elhgcf$m4r$1@sea.gmane.org>

```
On Sunday 10 December 2006 18:35, Jakub Narebski wrote:
> Arkadiusz Miskiewicz wrote:
> > I have weird problem wit git (1.4.4.2).
>
> I have tried to reproduce this error, but no luck.

Now I tracked that down to git-daemon in version 1.4.2.4 not 1.4.4.2. Seems 
that something was later fixed, so 1.4.4.2 is OK.
|
-- 
Arkadiusz Miśkiewicz        PLD/Linux Team

```

## Junio C Hamano, 2006-12-10 21:39

Subject: Re: reexporting git repository via git-daemon
Message-ID: <7vd56r4eis.fsf@assigned-by-dhcp.cox.net>
URL: https://gitlist.dev/e/7vd56r4eis.fsf%40assigned-by-dhcp.cox.net
In-Reply-To: <200612101742.44564.arekm@maven.pl>

```
Arkadiusz Miskiewicz <arekm@maven.pl> writes:

>> 100% repeatable at this moment. Any ideas?
>
> after:
> $  git repack -a -d
> Generating pack...
> Done counting 33587 objects.
> Deltifying 33587 objects.
>  100% (33587/33587) done
> Writing 33587 objects.
>  100% (33587/33587) done
> Total 33587, written 33587 (delta 23205), reused 33587 (delta 23205)
> Pack pack-bc830a5d1c2efa3b727ef9af8faba13c3e719395 created.
>
> the problem disapears and I can safely reexport git repository.
>
> Does anyone care about this bug in git?

I do.  I wanted to see if it reproduced but it didn't for me.


```
