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

Re: [PATCH 1/3] t3401: add another directory rename testcase for rebase and am

From
Elijah Newren <newren@gmail.com>
Date
Aug 29, 2018, 23:47 UTC
Message-ID
<CABPp-BFYhw9iU=jxt-1uY75GSt-_JtLnYQFf0kfjbqtK--xi3w@mail.gmail.com>
In-Reply-To
<xmqqo9dkakl0.fsf@gitster-ct.c.googlers.com>
Hi Junio,
On Wed, Aug 29, 2018 at 3:12 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 15 quoted lines
>
> Elijah Newren <newren@gmail.com> writes:
>
> > +test_expect_success 'rebase --interactive: NO directory rename' '
> > +     test_when_finished "git -C no-dir-rename rebase --abort" &&
> > +     (
> > +             cd no-dir-rename &&
> > +
> > +             git checkout B^0 &&
> > +
> > +             set_fake_editor &&
> > +             FAKE_LINES="1" test_must_fail git rebase --interactive A &&
>
> Is this a single-shot environment assignment?  That would have been
> caught with the test linter.
Ugh, yes.  Sorry.

I was trying to allow backporting to 2.18, so tried to build my series on that...but moved forward slightly to en/rebase-consistency in order to re-use the same testfile (as mentioned in my cover letter). But that meant my branch was missing a0a630192dca ("t/check-non-portable-shell: detect "FOO=bar shell_func"", 2018-07-13), so the test-linter couldn't catch this for me.

> Perhaps squashing this in would be sufficient fix?

Thanks for fixing it up. That works...although now I've spotted another minor issue. The FAKE_LINES setting is only needed for the interactive rebase case and can be removed for the other two. Oops. It doesn't hurt, but might confuse readers of the testcase.

Would you like me to resend a fixup on top of your fixup, resend the whole series with the fixes squashed, or just ignore this final (cosmetic) issue since it doesn't affect correctness and I've caused you enough extra work already?

Show 34 quoted lines
>  t/t3401-rebase-and-am-rename.sh | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/t/t3401-rebase-and-am-rename.sh b/t/t3401-rebase-and-am-rename.sh
> index 94bdfbd69c..13e09afec0 100755
> --- a/t/t3401-rebase-and-am-rename.sh
> +++ b/t/t3401-rebase-and-am-rename.sh
> @@ -141,7 +141,7 @@ test_expect_success 'rebase --interactive: NO directory rename' '
>                 git checkout B^0 &&
>
>                 set_fake_editor &&
> -               FAKE_LINES="1" test_must_fail git rebase --interactive A &&
> +               test_must_fail env FAKE_LINES="1" git rebase --interactive A &&
>
>                 git ls-files -s >out &&
>                 test_line_count = 6 out &&
> @@ -160,7 +160,7 @@ test_expect_success 'rebase (am): NO directory rename' '
>                 git checkout B^0 &&
>
>                 set_fake_editor &&
> -               FAKE_LINES="1" test_must_fail git rebase A &&
> +               test_must_fail env FAKE_LINES="1" git rebase A &&
>
>                 git ls-files -s >out &&
>                 test_line_count = 6 out &&
> @@ -179,7 +179,7 @@ test_expect_success 'rebase --merge: NO directory rename' '
>                 git checkout B^0 &&
>
>                 set_fake_editor &&
> -               FAKE_LINES="1" test_must_fail git rebase --merge A &&
> +               test_must_fail env FAKE_LINES="1" git rebase --merge A &&
>
>                 git ls-files -s >out &&
>                 test_line_count = 6 out &&
Previous: Junio C HamanoNext: Junio C Hamano
Message 10 of 20 in “A rebase regression in Git 2.18.0”
  1. Nikolay KasyanovAug 28, 2018
  2. Ævar Arnfjörð BjarmasonAug 28, 2018
  3. Johannes SchindelinAug 28, 2018
  4. Nikolay KasyanovAug 28, 2018
  5. Elijah NewrenAug 28, 2018
  6. Junio C HamanoAug 28, 2018
  7. 0/3 Turn off directory rename detection in am -3Elijah Newren, Aug 29, 2018
  8. 1/3 t3401: add another directory rename testcase for rebase and amElijah Newren, Aug 29, 2018
  9. Junio C HamanoAug 29, 2018
  10. Elijah NewrenAug 29, 2018
  11. Junio C HamanoAug 30, 2018
  12. Elijah NewrenAug 30, 2018
  13. 2/3 merge-recursive: add ability to turn off directory rename detectionElijah Newren, Aug 29, 2018
  14. Johannes SchindelinAug 29, 2018
  15. Elijah NewrenAug 29, 2018
  16. 3/3 am: avoid directory rename detection when calling recursive merge machineryElijah Newren, Aug 29, 2018
  17. Johannes SchindelinAug 29, 2018
  18. Elijah NewrenAug 30, 2018
  19. Johannes SchindelinAug 31, 2018
  20. Elijah NewrenAug 31, 2018

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.