Re: [PATCH/RFCv2 2/2] git rebase -i: warn about removed commits

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 2, 2015 at 3:42 AM, Remi Galan Alfonso
<remi.galan-alfonso@xxxxxxxxxxxxxxxxxxxxxxx> wrote:
> Eric Sunshine <sunshine@xxxxxxxxxxxxxx> writes:
>> > +test_expect_success 'rebase -i respects rebase.checkLevel' '
>> > +       test_config rebase.checkLevel error &&
>> > +       test_when_finished "git checkout master" &&
>> > +       git checkout -b tmp2 master &&
>> > +       set_fake_editor &&
>> > +       test_must_fail env FAKE_LINES="1 2 3 4" git rebase -i --root &&
>> > +       test E = $(git cat-file commit HEAD | sed -ne \$p)
>> > +'
>>
>> Shouldn't you also explicitly test "warn" and "ignore" modes?
>
> I don't think testing "ignore" is really necessary since it
> corresponds to the default behaviour, it is thus silently tested by
> the other tests.

Although the underlying behavior of "ignore" may be the same as the
default, you also want to check that higher-level machinery for
recognizing the "ignore" option is working correctly, which is why
checking "ignore" explicitly is a reasonable thing to do.

> Either way, I will add a test for "warn".
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]