git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[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.

Message 1 of 1 in “[BUG?] git rev-list --all --objects triggers fetches in partial clone”
  1. Philippe BlainNov 15, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.