cat-file: add --batch-command remote-object-info command
Under some circumstances, it is useful to get information about an object without having to download it completely.
The server logic has already been implemented as "a2ba162cda (object-info: support for retrieving object info, 2021-04-20)".
This patch adds client functions to communicate with the server.
Specifically, a new remote-object-ino command is added to git cat-file --batch-command.
Currently only size info can be retrieved. A example is like this
- The client user starts command `git cat-file --batch-command"
- The client user type in
remote-object-info <remote> <a object SHA> - The object size is returned without downloading the object on the client
Closes #335
Sending to mailing list v1: https://lore.kernel.org/git/20240628190503.67389-1-eric.peijian@gmail.com/
Edited by Eric Ju