Files
git/Documentation
Harald Nordgren 9271cd78cc remote: default to --limited-fetch in a shallow repository
Adding a second remote to a shallow 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 in the first place (for example with --single-branch), and
can make a plain "git fetch" on that remote hang or take a very long
time on a repository with many branches.

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.

Signed-off-by: Harald Nordgren <haraldnordgren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-10-30 08:02:52 -07:00
..
2026-10-19 12:22:54 -07:00
…
2025-12-14 17:04:37 +09:00
2026-10-01 11:26:40 -07:00
…
2025-12-16 09:42:44 +09:00
…
…
2026-10-02 09:46:18 -07:00