Re: [PATCH v4 3/4] git-cherry-pick: Add test to validate new options
Neil Horman <nhorman@tuxdriver.com> writes:
> Since we've added the --allow-empty and --keep-redundant-commits
> options to git cherry-pick we should also add a test to ensure that its working
> properly
Missing full-stop at the end of the sentence
> Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Show 9 quoted lines
> +test_expect_success 'cherry pick an empty non-ff commit without --allow-empty' '
> + git checkout master &&
> + echo fourth >> file2 &&
> + git add file2 &&
> + git commit -m "fourth" && {
> + git cherry-pick empty-branch2
> + test "$?" = 1
> + }
> +'Do we _deeply_ care that it fails with status 1, or should this be test_must_fail?
Show 6 quoted lines
> +test_expect_success 'cherry pick an empty non-ff commit with --allow-empty' '
> + git checkout master && {
> + git cherry-pick --allow-empty empty-branch2
> + test "$?" = 0
> + }
> +'Lose the 'test "$?" = 0' here.
> +test_expect_success 'cherry pick with --keep-redundant-commits' '
> + git checkout master && {
> + git cherry-pick --keep-redundant-commits HEAD^
> + test "$?" = 0> + }
> +'
> +
> test_done