Junio C Hamano <gitster@xxxxxxxxx> writes: >> +test_expect_success 'format-patch --range-diff as commentary' ' >> + git format-patch --stdout --range-diff=HEAD~1 HEAD~1 >actual && >> + grep -A 1 -e "\-\-\-" actual | grep "Range-diff:" > > Isn't "grep -A" GNUism? Sorry for short-write(2) X-<. Perhaps sed -ne "/^---$/,+1/s/^Range-diff:/&/p" or something along that line.