chiark
/
gitweb
/
~ianmdlvl
/
dgit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
78ec9b7
)
rpush: Support empty files in protocol_read_bytes
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sun, 26 Jul 2015 18:48:55 +0000
(19:48 +0100)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sun, 26 Jul 2015 18:54:45 +0000
(19:54 +0100)
dgit
patch
|
blob
|
history
diff --git
a/dgit
b/dgit
index 8a54610198e745b3e5f750bf9e787596ee31d5cb..d5aa38718c551c7c46b32ecf6c046bb502a50b96 100755
(executable)
--- 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";