threads / bug / 62500

[BUG?] git rev-list --all --objects triggers fetches in partial clone

Subject: [BUG?] git rev-list --all --objects triggers fetches in partial clone

## tl;dr

One message between Nov 15, 2024 and Nov 15, 2024.

replies: 0people: 1as markdown or json

Philippe Blain· Nov 15, 2024, 20:51 UTC · lore
Hi, 

I'm not sure if this is a bug, but I think this is not working as the documentation states (or, I do not understand the documentation!):

git clone --filter=blob:limit=250k git@github.com:git/git.git
cd git 
git rev-list --objects --all | \
  git cat-file --batch-check=’%(objecttype) %(objectname) %(objectsize) %(rest)’ | \
  sed -n ‘s/^blob //p’ | \
  sort --numeric-sort --reverse --key=2

The doc states that the default value for the --missing of 'git rev-list' is 'error', which "requests that rev-list stop with an error if a missing object is encountered." This is not what happens as each missing object is fetched one at a time.

If I use any other option for --missing (allow-any, allow-promisor, print) then no blobs are fetched.

Is this working as intended ? CC-ing a few people who I think worked on the partial clone feature.

Cheers, Philippe.

← back to recent threads