Skip to content

cat-file: add --batch-command remote-object-info command

Calvin Wan git 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest6 patches 25 repliesIn review
  2. v48 patches 27 repliesSuperseded
  3. v33 patches 23 repliesSuperseded

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6fetch-pack: refactor packet writingfetch-pack.c+6 -60 replies
2/6fetch-pack: move fetch initializationfetch-pack.c+6 -60 replies
3/6protocol-caps: initialization bug fixprotocol-caps.c+1 -11 reply
4/6serve: advertise object-info featureserve.c t/t5555-http-smart-common.sh t/t5701-git-serve.sh+11 -35 replies
5/6transport: add client support for object-infofetch-pack.c fetch-pack.h transport-helper.c +2 more+161 -57 replies
6/6cat-file: add remote-object-info to batch-commandDocumentation/git-cat-file.txt builtin/cat-file.c object-file.c +2 more+549 -547 replies

Reviews trailers per patch

None of the 6 patches has a Reviewed-by or Acked-by.

PatchJonathan Tan
SeriesHelped-by
1/6Helped-by
2/6Helped-by
3/6Helped-by
4/6Helped-by
5/6Helped-by
6/6Helped-by

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v5 thread

Cover letter [PATCH v5 0/6] cat-file: add --batch-command remote-object-info command

Sometimes 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 implements the client option for it.

Add --object-info option to cat-file --batch-command. This option allows the client to make an object-info command request to a server that supports protocol v2. If the server is v2, but does not allow for the object-info command request, the entire object is fetched and the relevant object info is returned.

=== Changes since v4 ===
- Instead of making 2 rounds trips to determine whether the server can handle the client object-info request, the server now advertises the features it can send back so the client can immediately fallback to fetch if any feature is not supported
- Fixed nits and clarified some documentation/commit messages

Calvin Wan (6):
fetch-pack: refactor packet writing
fetch-pack: move fetch initialization
protocol-caps: initialization bug fix
serve: advertise object-info feature
transport: add client support for object-info
cat-file: add remote-object-info to batch-command

 Documentation/git-cat-file.txt |  16 +-
 builtin/cat-file.c             | 225 ++++++++++++++++-----
 fetch-pack.c                   |  52 +++--
 fetch-pack.h                   |  10 +
 object-file.c                  |  11 ++
 object-store.h                 |   3 +
 protocol-caps.c                |   2 +-
 serve.c                        |  10 +-
 t/t1006-cat-file.sh            | 348 +++++++++++++++++++++++++++++++++
 t/t5555-http-smart-common.sh   |   2 +-
 t/t5701-git-serve.sh           |   2 +-
 transport-helper.c             |   7 +-
 transport.c                    | 110 ++++++++++-
 transport.h                    |  11 ++
 14 files changed, 734 insertions(+), 75 deletions(-)

base-commit: 9dd64cb4d310986dd7b8ca7fff92f9b61e0bd21a

Signature · 1 line
2.37.1.455.g008518b4e5-goog