@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

When fetching Git repositories, pass "--no-tags" to make explicit "Fetch Refs" operate more narrowly

Summary:
Ref T13448. The default behavior of "git fetch '+refs/heads/master:refs/heads/master'" is to follow and fetch associated tags.

We don't want this when we pass a narrow refspec because of "Fetch Refs" configuration. Tell Git that we only want the refs we explicitly passed.

Note that this doesn't prevent us from fetching tags (if the refspec specifies them), it just stops us from fetching extra tags that aren't part of the refspec.

Test Plan:
- Ran "bin/repository pull X --trace --verbose" in a repository with a "Fetch Refs" configuration, saw only "master" get fetched (previously: "master" and reachable tags).
- Ran "git fetch --no-tags '+refs/*:refs/*'", saw tags fetched normally ("--no-tags" does not disable fetching tags).

Maniphest Tasks: T13448

Differential Revision: https://secure.phabricator.com/D20893

+1 -1
+1 -1
src/applications/repository/engine/PhabricatorRepositoryPullEngine.php
··· 421 421 // checked out. See T13280. 422 422 423 423 $future = $repository->getRemoteCommandFuture( 424 - 'fetch --update-head-ok -- %P %Ls', 424 + 'fetch --no-tags --update-head-ok -- %P %Ls', 425 425 $repository->getRemoteURIEnvelope(), 426 426 $fetch_rules); 427 427