Pass --no-filter and --no-tags in git download commands

In partial clone checkouts (e.g. --filter=blob:none or blob:limit=10k),
fetching a change ref without explicit filter overrides can omit blobs
for the incoming change if the remote matches a configured promisor
remote. Subsequent checkout, cherry-pick, or reset operations then
trigger on-demand unadvertised object fetches (POST /git-upload-pack
with 'want <blob_sha>'), which can cause expensive server-side
reachability walks and timeouts. Additionally, omitting --no-tags causes
git fetch and git pull to request refs/tags/ and perform automated tag
following and backfilling across remote tags.

Pass --no-filter and --no-tags in GitDownloadCommand for all git fetch
download commands (Branch, Checkout, Cherry Pick, Format Patch, and
Reset To), and pass --no-tags in PullCommand (as git pull forwards
--no-tags to git fetch but does not accept --no-filter).

TAG=agy
CONV=e5a86656-4920-42a4-8645-c41d9f59a203

Google-Bug-Id: b/532920848
Release-Notes: Pass --no-filter and --no-tags in git download commands
Change-Id: Icdf55d95fa8136ae66a3bad50297df6f51226582
13 files changed
tree: 541abb04e0a93a06722e69af0549deb0901055d1
  1. src/
  2. .gitignore
  3. BUILD
  4. LICENSE
  5. README.md
README.md

Gerrit download-commands plugin

All documentation may be found under src/main/resources/Documentation/.