From: Junio C Hamano Date: Wed, 11 Apr 2012 21:06:34 GMT Subject: Re: [PATCH v4 3/4] git-cherry-pick: Add test to validate new options Message-ID: <7vwr5mhtb9.fsf@alter.siamese.dyndns.org> In-Reply-To: <1334175716-11391-4-git-send-email-nhorman@tuxdriver.com> Neil Horman 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 > +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? > +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 Likewise. > + } > +' > + > test_done Thanks.