Thread (21 messages) flat view 21 messages, 6 authors, 2016-06-15

Re: [PATCHv4] rebase [-i --exec | -ix] <CMD>...

From: Johannes Sixt <hidden>
Date: 2016-06-15 22:54:01

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>' '

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help