On 05/01/2012 08:00 PM, Junio C Hamano wrote: > Zbigniew Jędrzejewski-Szmek <zbyszek@xxxxxxxxx> writes: > >> Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@xxxxxxxxx> >> --- >> t/t4006-diff-mode.sh | 32 +++++++++++++++----------------- >> 1 file changed, 15 insertions(+), 17 deletions(-) > > Style update is welcome, but shouldn't the assignment to sed_script > be done in the second test if it is the only user? If you are going to > add more tests at the end, then it should be away from the second test to > make it clear that it is not part of it. Hi, $sed_script is indeed only used in that one test. But moving the assignment inside would complicate the quoting rules (the script is now quoted with ', but this would have to change inside the test case which is quoted with ' too). I actually think it's simpler this way. Thanks, Zbyszek >> -sed -e 's/\(:100644 100755\) \('"$_x40"'\) \2 /\1 X X /' <current >check >> -echo ":100644 100755 X X M rezrov" >expected >> +# $_x40 is defined in test-lib.sh >> +sed_script='s/\(:100644 100755\) \('"$_x40"'\) \2 /\1 X X /' -- 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