Harald Nordgren's original patch added a fetch.shallow option, so that a fetch or pull in a shallow repository would fetch only the current branch's upstream. Thread activity in the last day shows a new multi-patch series that takes a different approach.

The motivating case is a shallow single-branch clone where git remote add upstream <url> sets up the default wildcard refspec, so the next git fetch upstream downloads every branch of that remote. The series separates what to fetch from where to store it. A new remote.<name>.fetchUpstreams setting says what to fetch: the upstream branches of local branches on that remote. A new remote.<name>.fetchRefmap setting says where the results are stored.

Several preparatory patches change --refmap. It will apply only to refspecs without their own destination, so a refspec naming a destination is stored there only. git fetch --refmap=<map> <remote> without command-line refspecs will no longer die, and configured refspecs will decide what is fetched. Another patch factors out the check for whether a branch builds on a given remote, which was inlined for the current branch.

git remote add --limited-fetch sets up fetchRefmap and fetchUpstreams instead of remote.<name>.fetch, and is rejected together with -t/--track or --mirror. Another patch makes it the default when the repository is already shallow and neither option is given.

Phillip Wood, Junio C Hamano, D. Ben Knoble, Matt Hunter and Kristoffer Haugsbakk took part in the thread, which has 165 messages in all. The excerpts do not show their positions on the new series, and the thread was featured earlier this week.