t9300: use perl "head -c" clone in place of "dd bs=1 count=16000" kluge
It is unfortunate to have to issue thousands of one-byte read calls to
work around dd's refusal to buffer input that would fill a block after
a short read (a3a6f4, 2010-12-13). We could do better by using
"head -c", if it were available on all platforms we cared about.
Replace it with some simple perl.
While doing so, restructure 9300.114 to use a subshell instead of a
script. Subshells can inherit functions (like the new head_c) from
the parent shell while external scripts cannot.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>