Re: [PATCH v5 3/4] git-cherry-pick: Add test to validate new options
- From
Neil Horman <nhorman@tuxdriver.com>
- Date
- Apr 16, 2012, 11:04 UTC
- Message-ID
- <20120416110402.GB13366@hmsreliant.think-freely.org>
- In-Reply-To
- <20120415093933.GB6263@ecki>
On Sun, Apr 15, 2012 at 11:39:35AM +0200, Clemens Buchacher wrote:
Show 32 quoted lines
> On Fri, Apr 13, 2012 at 02:45:06PM -0400, Neil Horman wrote:
> >
> > +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" && {
> > + test_must_fail git cherry-pick empty-branch2
> > + }
> > +'
>
> You don't need the braces. The same below.
>
> > +
> > +test_expect_success 'cherry pick an empty non-ff commit with --allow-empty' '
> > + git checkout master && {
> > + git cherry-pick --allow-empty empty-branch2
> > + }
> > +'
> > +
> > +test_expect_success 'cherry pick with --keep-redundant-commits' '
> > + git checkout master && {
> > + git cherry-pick --keep-redundant-commits HEAD^
> > + }
> > +'
>
> And the expected result is that the HEAD commit is not removed, right?
> You should check for that as well.
>
> Also, please checkout empty-branch2^0 first, in order to make the test
> independent of its predecessor.
> ACK, I'll fix these up, thanks Neil