]> git.ipfire.org Git - thirdparty/git.git/commit
upload-pack: add tracing for fetches
authorRobert Coup <robert@coup.net.nz>
Tue, 17 Oct 2023 21:12:47 +0000 (21:12 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 30 Oct 2023 12:43:21 +0000 (21:43 +0900)
commitb8f58c200cd3493ccf3c1669aa3c34927c884018
tree50e61415019a9d4a57ca08d1007acd1211b91c6f
parent3130c155df9a65ebccf128b4af5a19af49532580
upload-pack: add tracing for fetches

Information on how users are accessing hosted repositories can be
helpful to server operators. For example, being able to broadly
differentiate between fetches and initial clones; the use of shallow
repository features; or partial clone filters.

a29263c (fetch-pack: add tracing for negotiation rounds, 2022-08-02)
added some information on have counts to fetch-pack itself to help
diagnose negotiation; but from a git-upload-pack (server) perspective,
there's no means of accessing such information without using
GIT_TRACE_PACKET to examine the protocol packets.

Improve this by emitting a Trace2 JSON event from upload-pack with
summary information on the contents of a fetch request.

* haves, wants, and want-ref counts can help determine (broadly) between
  fetches and clones, and the use of single-branch, etc.
* shallow clone depth, tip counts, and deepening options.
* any partial clone filter type.

Signed-off-by: Robert Coup <robert@coup.net.nz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t5500-fetch-pack.sh
upload-pack.c