Skip to content

git-cat-file: Support for reading object type and content from a remote without downloading them

Once we are in a world where we have blobs offloaded to promisor remotes, it would be nice to enable Git to access objects directly through git-cat-file(1) without having to download the entire object to do so.

https://lore.kernel.org/git/20220728230210.2952731-7-calvinwan@google.com/ was a patch series that attempted to enable a new option remote-object-info is based on the same basic idea. (this topic got dropped at some point though from lack of activity).

What if we had a mode --allow-promisor=missing or something like that such that when git-cat-file(1) cannot find an object in the database, it will try looking on promisor remotes.

git-cat-file(1) is the underlying Git call for a lot of repository access from the Rails application. If we could allow git-cat-file(1) to access objects from promisor remotes and stream them to the client, it would be more efficient for repositories where the bulk of objects live on object storage.

Edited by John Cai