git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Jun 2, 2015, 13:41 UTC
Message-ID
<CAPig+cQF6irJqYFZ=2YSevjF+ySUn25udYMKSg+VzXP0p0-eAw@mail.gmail.com>
In-Reply-To
<53678876.5326.1433230965582.JavaMail.zimbra@ensimag.grenoble-inp.fr>

On Tue, Jun 2, 2015 at 3:42 AM, Remi Galan Alfonso <remi.galan-alfonso@ensimag.grenoble-inp.fr> wrote:

Show 15 quoted lines
> Eric Sunshine <sunshine@sunshineco.com> 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".
Previous: Remi Galan AlfonsoNext: Remi Galan Alfonso
Message 6 of 10 in “git-rebase -i: add command "drop" to remove a commit”
  1. 1/2 git-rebase -i: add command "drop" to remove a commitGalan Rémi, Jun 1, 2015
  2. 2/2 git rebase -i: warn about removed commitsGalan Rémi, Jun 1, 2015
  3. Eric SunshineJun 1, 2015
  4. Eric SunshineJun 1, 2015
  5. Remi Galan AlfonsoJun 2, 2015
  6. Eric SunshineJun 2, 2015
  7. Remi Galan AlfonsoJun 2, 2015
  8. Matthieu MoyJun 2, 2015
  9. Remi Galan AlfonsoJun 2, 2015
  10. Junio C HamanoJun 2, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.