Re: [PATCH 3/4] rev-parse test: use test_cmp instead of test builtin

2013-09-03 Thread Junio C Hamano
Jonathan Nieder jrnie...@gmail.com writes: Use test_cmp instead of passing two command substitutions to the test builtin. This way: - when tests fail, they can print a helpful diff if run with --verbose - the argument order test_cmp expect actual feels natural, unlike test known

Re: [PATCH 3/4] rev-parse test: use test_cmp instead of test builtin

2013-09-03 Thread Felipe Contreras
On Tue, Sep 3, 2013 at 12:07 PM, Jonathan Nieder jrnie...@gmail.com wrote: test_expect_success 'start^0' ' - test $(cat .git/refs/tags/start) = $(git rev-parse start^0) + test_cmp_rev_output tags/start git rev-parse start^0 ' Backwards and yodaish this is. -- Felipe Contreras

Re: [PATCH 3/4] rev-parse test: use test_cmp instead of test builtin

2013-09-03 Thread Jonathan Nieder
Junio C Hamano wrote: After applying this patch and running git show | grep test_cmp_rev_output, I notice that the second is always git rev-parse something. Do we still need to eval these, or would it be sufficient to do test_cmp_rev_output () { git rev-parse