summaryrefslogtreecommitdiffstats
path: root/contrib/persistent-https
diff options
context:
space:
mode:
authorShreyansh Paliwal <shreyanshpaliwalcmsmn@gmail.com>2026-01-21 18:24:11 +0530
committerJunio C Hamano <gitster@pobox.com>2026-01-21 09:40:59 -0800
commita824421d3644f39bfa8dfc75876db8ed1c7bcdbf (patch)
treef484e7a9a09934b7d06f512950857371697a83b0 /contrib/persistent-https
parent83a69f19359e6d9bc980563caca38b2b5729808c (diff)
downloadgit-a824421d3644f39bfa8dfc75876db8ed1c7bcdbf.tar.gz
git-a824421d3644f39bfa8dfc75876db8ed1c7bcdbf.zip
t5500: simplify test implementation and fix git exit code suppression
The 'shallow since with commit graph and already-seen commit” test uses a convoluted here-doc that combines manual input construction with packetize, echo and embedded Git commands. This structure hides failures from the git commands, as their exit codes are suppressed inside echo command substitution and being on the upstream side of pipes. Instead of using here-doc to construct the pack protocol that is directly sent to the 'git upload-pack' command being tested, capture the outputs of the git commands upfront and use the 'test-tool pkt-line pack' tool to construct the input in a temporary file, and then feed it to the command. This has a few advantages: * Executing the git commands outside the here-doc avoids suppressing their exit codes and makes debugging easier. * It removes the need to manually count and manage pkt-line lengths to keep in line with the v2 protocol, as the tool handles this internally. Signed-off-by: Shreyansh Paliwal <shreyanshpaliwalcmsmn@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/persistent-https')
0 files changed, 0 insertions, 0 deletions