# Git fetches whole repository and not just latest

5 messages from 2020-05-29 to 2020-05-30. Participants: Andy Shevchenko, Jonathan Nieder.
Thread: https://gitlist.dev/t/53580

## Andy Shevchenko, 2020-05-29 10:45

Subject: Git fetches whole repository and not just latest
Message-ID: <CAHp75Ves8x9_1=fVo_+dB92GpAGLcbGVqeo2gjRbBnzTzM0uzg@mail.gmail.com>
URL: https://gitlist.dev/e/CAHp75Ves8x9_1%3DfVo_%2BdB92GpAGLcbGVqeo2gjRbBnzTzM0uzg%40mail.gmail.com

```
A bit of description what I have on my side.
So, I have a local repository which has many remotes added (~20 or
so). Most of them are from the same Git server, but few are from
different servers.

To refresh the state of my local repository I run `git remote update
-p`. One note that I'm behind the proxy. This schema works for few
years until out of a sudden (approximately  month ago) I have noticed
that Git started fetching whole repository instead of only latest
stuff. Note, that the repositories in question are from the main
server. Yes, sometimes it goes well, sometimes some random repository
gets downloaded in full.

Example:

(few days ago)

Fetching spi
remote: Enumerating objects: 18064, done.
remote: Counting objects: 100% (18064/18064), done.
remote: Compressing objects: 100% (2784/2784), done.
remote: Total 7343589 (delta 16227), reused 15523 (delta 15266),
pack-reused 7325525
Receiving objects: 100% (7343589/7343589), 1.21 GiB | 2.36 MiB/s, done.

(today)

Fetching spi
remote: Enumerating objects: 822, done.
remote: Counting objects: 100% (686/686), done.
remote: Compressing objects: 100% (323/323), done.
remote: Total 602 (delta 485), reused 358 (delta 279), pack-reused 0
Receiving objects: 100% (602/602), 160.25 KiB | 896.00 KiB/s, done.

(also today)
Fetching origin
remote: Enumerating objects: 17806, done.
remote: Counting objects: 100% (17806/17806), done.
remote: Compressing objects: 100% (2681/2681), done.
remote: Total 7343331 (delta 15992), reused 15321 (delta 15106),
pack-reused 7325525
Receiving objects: 100% (7343331/7343331), 1.21 GiB | 7.59 MiB/s, done.

origin, for example, almost everyday now gets in full (1.21 GiB!),
while others have no pattern.

I would like to know if it's problem of proxy, or that specific Git
server or is it (new) bug in Git?

-- 
With Best Regards,
Andy Shevchenko

```

## Jonathan Nieder, 2020-05-29 17:29

Subject: Re: Git fetches whole repository and not just latest
Message-ID: <20200529172955.GA123244@google.com>
URL: https://gitlist.dev/e/20200529172955.GA123244%40google.com
In-Reply-To: <CAHp75Ves8x9_1=fVo_+dB92GpAGLcbGVqeo2gjRbBnzTzM0uzg@mail.gmail.com>

```
Hi Andy,

Andy Shevchenko wrote:

> So, I have a local repository which has many remotes added (~20 or
> so). Most of them are from the same Git server, but few are from
> different servers.
[...]
> origin, for example, almost everyday now gets in full (1.21 GiB!),
> while others have no pattern.
>
> I would like to know if it's problem of proxy, or that specific Git
> server or is it (new) bug in Git?

What Git version are you using?  Can you test 2.27.0-rc2?

I believe this is fixed by

	commit 2f0a093dd640e0dad0b261dae2427f2541b5426c
	Author: Jonathan Tan <jonathantanmy@google.com>
	Date:   Mon Apr 27 17:01:10 2020 -0700

	    fetch-pack: in protocol v2, reset in_vain upon ACK

which is part of 2.27.0-rc0.

Thanks and hope that helps,
Jonathan

```

## Andy Shevchenko, 2020-05-29 19:08

Subject: Re: Git fetches whole repository and not just latest
Message-ID: <CAHp75VdTX=pJw6r=H=qfaDcv07n69uGQQ0TwrR0bACAx-OQAXQ@mail.gmail.com>
URL: https://gitlist.dev/e/CAHp75VdTX%3DpJw6r%3DH%3DqfaDcv07n69uGQQ0TwrR0bACAx-OQAXQ%40mail.gmail.com
In-Reply-To: <20200529172955.GA123244@google.com>

```
On Fri, May 29, 2020 at 8:29 PM Jonathan Nieder <jrnieder@gmail.com> wrote:
> Andy Shevchenko wrote:
>
> > So, I have a local repository which has many remotes added (~20 or
> > so). Most of them are from the same Git server, but few are from
> > different servers.
> [...]
> > origin, for example, almost everyday now gets in full (1.21 GiB!),
> > while others have no pattern.
> >
> > I would like to know if it's problem of proxy, or that specific Git
> > server or is it (new) bug in Git?
>
> What Git version are you using?

git version 2.26.2

>  Can you test 2.27.0-rc2?

Is there any deb package?

> I believe this is fixed by
>
>         commit 2f0a093dd640e0dad0b261dae2427f2541b5426c
>         Author: Jonathan Tan <jonathantanmy@google.com>
>         Date:   Mon Apr 27 17:01:10 2020 -0700
>
>             fetch-pack: in protocol v2, reset in_vain upon ACK
>
> which is part of 2.27.0-rc0.
>
> Thanks and hope that helps,

I'll try to allocate slot to test later, if there is deb available, I
can do it sooner.

Thanks!

-- 
With Best Regards,
Andy Shevchenko

```

## Jonathan Nieder, 2020-05-29 19:20

Subject: Re: Git fetches whole repository and not just latest
Message-ID: <20200529192023.GC123244@google.com>
URL: https://gitlist.dev/e/20200529192023.GC123244%40google.com
In-Reply-To: <CAHp75VdTX=pJw6r=H=qfaDcv07n69uGQQ0TwrR0bACAx-OQAXQ@mail.gmail.com>

```
Andy Shevchenko wrote:
> On Fri, May 29, 2020 at 8:29 PM Jonathan Nieder <jrnieder@gmail.com> wrote:

>> What Git version are you using?
>
> git version 2.26.2

Thanks, makes sense.

>>  Can you test 2.27.0-rc2?
>
> Is there any deb package?

Yes, you can use the package from Debian unstable or experimental
(https://tracker.debian.org/pkg/git).

If you're on Ubuntu, you can use
https://launchpad.net/~git-core/+archive/ubuntu/candidate once it
updates (cc-ing the maintainers of the PPA in case they want to
comment on when that will be --- e.g. Git 2.27 is planned to come
out this Monday).

Thanks,
Jonathan

```

## Andy Shevchenko, 2020-05-30 11:16

Subject: Re: Git fetches whole repository and not just latest
Message-ID: <CAHp75VcQWJNJ2cmKjzqepLvhtynDSYi+Cvp1e7k4kn06pAb6gQ@mail.gmail.com>
URL: https://gitlist.dev/e/CAHp75VcQWJNJ2cmKjzqepLvhtynDSYi%2BCvp1e7k4kn06pAb6gQ%40mail.gmail.com
In-Reply-To: <20200529192023.GC123244@google.com>

```
On Fri, May 29, 2020 at 10:20 PM Jonathan Nieder <jrnieder@gmail.com> wrote:
> Andy Shevchenko wrote:
> > On Fri, May 29, 2020 at 8:29 PM Jonathan Nieder <jrnieder@gmail.com> wrote:

...

> >>  Can you test 2.27.0-rc2?
> >
> > Is there any deb package?
>
> Yes, you can use the package from Debian unstable or experimental
> (https://tracker.debian.org/pkg/git).

I run old version, noticed the bug, Ctrl+C immediately. Then I have
installed rc2 and re-run without noticing the bug. Since it's only one
run, I can't be sure, but I'll definitely monitor the situation for a
long run. Thanks!

-- 
With Best Regards,
Andy Shevchenko

```
