summaryrefslogtreecommitdiff
path: root/t/t4013/diff.diff_initial..side
diff options
context:
space:
mode:
authorCalvin Wan <calvinwan@google.com>2026-07-24 12:54:22 +0200
committerJunio C Hamano <gitster@pobox.com>2026-07-24 08:46:59 -0700
commit12a19eec1d7c0121e0c82c95a2300fdbad1f18f2 (patch)
treee11b5b9d5089f3b9b31be948cba2dc3c724bbaae /t/t4013/diff.diff_initial..side
parent7dcbd35a120c04e30462407c4c9446aaaba9068f (diff)
transport: add client support for object-info
Sometimes, it is beneficial to retrieve information about an object without downloading it entirely. The server-side logic for this functionality was implemented in commit "a2ba162cda (object-info: support for retrieving object info, 2021-04-20)." And the wire format is documented at https://git-scm.com/docs/protocol-v2#_object_info. Introduce client-side support for the object-info capability. Add its own function for object-info separate from existing fetch infrastructure. Currently, the client supports requesting a list of OIDs with the size attribute from a v2 server. If the server does not advertise this feature (i.e., transfer.advertiseobjectinfo is set to false), the client returns an error and exits. Note that: 1. The entire request is written into req_buf before being sent to the remote. This approach follows the pattern used in the send_fetch_request() logic within 'fetch-pack.c'. Streaming the request is not addressed in this patch. 2. A new field 'unrecognized' has been added to object_info. This new field is set at fetch_object_info() when the object is unrecognized by the server. Helped-by: Jonathan Tan <jonathantanmy@google.com> Helped-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Calvin Wan <calvinwan@google.com> Signed-off-by: Eric Ju <eric.peijian@gmail.com> Signed-off-by: Pablo Sabater <pabloosabaterr@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4013/diff.diff_initial..side')
0 files changed, 0 insertions, 0 deletions