From 08246013777e261333f6f972554bc02ae17bc60a Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 26 Jul 2015 19:48:55 +0100 Subject: [PATCH] rpush: Support empty files in protocol_read_bytes --- dgit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dgit b/dgit index 8a546101..d5aa3871 100755 --- a/dgit +++ b/dgit @@ -273,7 +273,7 @@ sub protocol_send_file ($$) { sub protocol_read_bytes ($$) { my ($fh, $nbytes) = @_; - $nbytes =~ m/^[1-9]\d{0,5}$/ or badproto \*RO, "bad byte count"; + $nbytes =~ m/^[1-9]\d{0,5}$|^0$/ or badproto \*RO, "bad byte count"; my $d; my $got = read $fh, $d, $nbytes; $got==$nbytes or badproto_badread $fh, "data block"; -- 2.30.2