summaryrefslogtreecommitdiff
path: root/t/t0021
diff options
context:
space:
mode:
authorLibravatar Christian Couder <christian.couder@gmail.com>2017-11-21 17:09:38 +0100
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-11-22 16:23:55 +0900
commitcb1c64b4a8eeda9bc576063c3c9eea34d5693560 (patch)
tree51b90350cf751db8a166edf050405172b23e1fd8 /t/t0021
parentGit/Packet.pm: extract parts of t0021/rot13-filter.pl for reuse (diff)
downloadtgif-cb1c64b4a8eeda9bc576063c3c9eea34d5693560.tar.xz
Git/Packet: clarify that packet_required_key_val_read allows EOF
The function calls itself "required", but it does not die when it sees an unexpected EOF. Let's rename it to "packet_key_val_read()". Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t0021')
-rw-r--r--t/t0021/rot13-filter.pl4
1 files changed, 2 insertions, 2 deletions
diff --git a/t/t0021/rot13-filter.pl b/t/t0021/rot13-filter.pl
index 6fd7fa476b..f1678851de 100644
--- a/t/t0021/rot13-filter.pl
+++ b/t/t0021/rot13-filter.pl
@@ -70,7 +70,7 @@ print $debug "init handshake complete\n";
$debug->flush();
while (1) {
- my ( $res, $command ) = packet_required_key_val_read("command");
+ my ( $res, $command ) = packet_key_val_read("command");
if ( $res == -1 ) {
print $debug "STOP\n";
exit();
@@ -106,7 +106,7 @@ while (1) {
packet_txt_write("status=success");
packet_flush();
} else {
- my ( $res, $pathname ) = packet_required_key_val_read("pathname");
+ my ( $res, $pathname ) = packet_key_val_read("pathname");
if ( $res == -1 ) {
die "unexpected EOF while expecting pathname";
}