From: Junio C Hamano Date: Wed, 13 Feb 2019 21:00:45 GMT Subject: Re: [Patch v1 2/3] t5318: replace use of /dev/zero with generate_zero_bytes Message-ID: In-Reply-To: <004701d4c3c8$8a018d20$9e04a760$@nexbridge.com> "Randall S. Becker" writes: > My second attempt was to create the generate_zero_bytes function to replace > exactly what the second dd was doing but not user /dev/zero. Yes, and I think the patch does that ;-) It was just the original dd if=/dev/zero of=... bs=1 seek=$there count=$this_many would have been impossible to rewrite with the new generate_zero_bytes helper unless $there weren't seeking to the end of the file. But the other dd before the one the patch rewrites truncates the file to make that seek=$there seeking to the end of the file, so simply appending output from genereate_zero_bytes is sufficient and correct conversion. I wanted to explain that for future readers who may wonder if the patch is doing the exact conversion.