Re: [PATCH v10 5/5] remote: default to --limited-fetch in a shallow repository
Show 20 quoted lines
> > Adding a second remote to a shallow, single-branch clone used to
> > still fetch every branch that remote has, since "git remote add"
> > always set up a wildcard remote.<name>.fetch refspec regardless of
> > how shallow the repository already was. That defeats the purpose of
> > having cloned shallow and single-branch in the first place, and can
> > make a plain "git fetch" on that remote hang or take a very long
> > time on a repository with many branches.
>
> First we focus on "single-branch shallow clones", but…
>
> > Turn --limited-fetch on by default when the repository is already
> > shallow and neither -t/--track nor --mirror was given, so that
> > adding a remote there does not by itself commit to following every
> > branch it has. --no-limited-fetch keeps the previous behavior for
> > whoever wants it.
>
> …now we only care about shallow. I think that's reasonable, since we
> don't have a way to track "was cloned with a single-branch" (and it's
> not really the key criterion anyway), but the wording begged the
> question ;)
Good point, I'll improve.
Harald