Jeff King <peff@xxxxxxxx> writes: > On Mon, Mar 25, 2013 at 04:21:34PM -0400, Jeff King wrote: > >> +# Convert byte at offset "$2" of object "$1" into '\0' >> +corrupt_byte() { >> + obj_file=$(obj_to_file "$1") && >> + chmod +w "$obj_file" && >> + printf '\0' | dd of="$obj_file" bs=1 seek="$2" >> +} > > Hmm, this last line should probably be: > > diff --git a/t/t1060-object-corruption.sh b/t/t1060-object-corruption.sh > index a84deb1..3f87051 100755 > --- a/t/t1060-object-corruption.sh > +++ b/t/t1060-object-corruption.sh > @@ -12,7 +12,7 @@ corrupt_byte() { > corrupt_byte() { > obj_file=$(obj_to_file "$1") && > chmod +w "$obj_file" && > - printf '\0' | dd of="$obj_file" bs=1 seek="$2" > + printf '\0' | dd of="$obj_file" bs=1 seek="$2" conv=notrunc > } > > test_expect_success 'setup corrupt repo' ' > > The intent was to change a single byte, not truncate the file (though on > the plus side, that truncation is what found the other bugs). ;-). Thanks, I missed that. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html