Re: [PATCHv4] rebase [-i --exec | -ix] <CMD>...
Johannes Sixt <j6t@kdbg.org> writes:
Show 19 quoted lines
> Am 10.06.2012 12:44, schrieb Lucien Kong:
>> +test_expect_success 'rebase -i --exec without <CMD> shows error message and usage' '
>> + git reset --hard execute &&
>> + test_must_fail git rebase -i --exec 2>actual &&
>> + sed '1d' actual >tmp &&
>> + mv tmp actual &&
>> + test_must_fail git rebase -h >expected &&
>> + test_cmp expected actual &&
>> + git checkout master
>> +'
>
> IMO, it is more important to check that the error message is present
> rather than whether the usage blurb is correct. But since the error is
> generated by the option parsing machinery, it is probably sufficient to
> check *only* for failure, and don't verify the output at all.
>
> Then change the headline of the text to the neutral
>
> test_expect_success 'rebase -i --exec without <CMD>' '
Makes sense; thanks for a thoughtful suggestion.
Show 12 quoted lines
> And, BTW, next time I point out that sed 'xy'... should be changed to
> sed -e "xy"... you review *ALL* sed commands you introduce, not just
> those that I point out, OK?
>
> And, BTW, when I point out that ...>expected && sed <expected >expect &&
> mv expect expected should be ...>expect && sed <expect >expected, you
> extrapolate *yourself* that the same pattern applies even if the files
> are named "tmp" and "actual", OK?
>
> That's expected from thoughtful contributors.
>
> -- Hannes