[BUG?] git rev-list --all --objects triggers fetches in partial clone
- From
Philippe Blain <levraiphilippeblain@gmail.com>
- Date
- Nov 15, 2024, 20:51 UTC
- Message-ID
- <6b41b122-0657-00b2-d613-296354376026@gmail.com>
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.