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

Re: What's cooking in git.git (May 2017, #07; Tue, 23)

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
May 23, 2017, 19:50 UTC
Message-ID
<CACBZZX4adLy6Xumicu3Qke=g39EEe3iBa5ShsGvTBAYFqXENPg@mail.gmail.com>
In-Reply-To
<CAGZ79kYoHYz6hi5kDjQBcN-35c0kXE6mf6NNV_Z_F6-UqZ=3cw@mail.gmail.com>
On Tue, May 23, 2017 at 9:38 PM, Stefan Beller <sbeller@google.com> wrote:
Show 27 quoted lines
> On Tue, May 23, 2017 at 12:08 PM, Stefan Beller <sbeller@google.com> wrote:
>> On Tue, May 23, 2017 at 1:08 AM, Junio C Hamano <gitster@pobox.com> wrote:
>>
>>> * sb/submodule-blanket-recursive (2017-05-23) 6 commits
>>>  . builtin/push.c: respect 'submodule.recurse' option
>>>  . builtin/grep.c: respect 'submodule.recurse' option
>>>  . builtin/fetch.c: respect 'submodule.recurse' option
>>>  . Introduce submodule.recurse option for worktree manipulators
>>>  . submodule test invocation: only pass additional arguments
>>>  . submodule.c: add has_submodules to check if we have any submodules
>>>  (this branch uses sb/reset-recurse-submodules.)
>>>
>>>  A new configuration variable "submodule.recurse" can be set to true
>>>  to force various commands run at the top-level superproject to
>>>  behave as if they were invoked with the "--recurse-submodules"
>>>  option.
>>>
>>>  Seems to break t7814 when merged to 'pu'.
>>
>> I will investigate! (It passes on its own, so I guess it is some
>> interference with a recent grep series)
>
> And the winner is 5d52a30eda (grep: amend submodule recursion
> test for regex engine testing, 2017-05-20, by Ævar)
>
> The tests added by grep rely on the old content of
> test 2 'grep correctly finds patterns in a submodule'.
Sorry about the fallout.
Show 32 quoted lines
> The (whitespace broken) diff below fixes it.
> I think the best way forward is that my series relies on
> that series as a foundation then, and writes correct tests based
> on the file contents at that version.
>
> ---8<---
> diff --git a/t/t7814-grep-recurse-submodules.sh
> b/t/t7814-grep-recurse-submodules.sh
> index 14eeb54b4b..ce9fbbc1f6 100755
> --- a/t/t7814-grep-recurse-submodules.sh
> +++ b/t/t7814-grep-recurse-submodules.sh
> @@ -36,18 +36,18 @@ test_expect_success 'grep correctly finds patterns
> in a submodule' '
>  test_expect_success 'grep finds patterns in a submodule via config' '
>         test_config submodule.recurse true &&
>         # expect from previous test
> -       git grep -e "bar" >actual &&
> +       git grep -e3 >actual &&
>         test_cmp expect actual
>  '
>
>  test_expect_success 'grep --no-recurse-submodules overrides config' '
>         test_config submodule.recurse true &&
>         cat >expect <<-\EOF &&
> -       a:foobar
> -       b/b:bar
> +       a:(1|2)d(3|4)
> +       b/b:(3|4)
>         EOF
>
> -       git grep -e "bar" --no-recurse-submodules >actual &&
> +       git grep -e4 --no-recurse-submodules >actual &&
The rest of my changed just did:
        foobar -> (1|2)d(3|4)
        foo    -> (1|2)
        bar    -> (3|4)

While this works might want to do e.g. `-e "(3|4)"` here like the rest. This works, but probably confusing going forward when it's the only exception.

Show 6 quoted lines
>         test_cmp expect actual
>  '
> ---8<---
>
> Thanks,
> Stefan
Previous: Stefan BellerNext: Junio C Hamano
Message 4 of 6 in “What's cooking in git.git (May 2017, #07; Tue, 23)”
  1. Junio C HamanoMay 23, 2017
  2. Stefan BellerMay 23, 2017
  3. Stefan BellerMay 23, 2017
  4. Ævar Arnfjörð BjarmasonMay 23, 2017
  5. Junio C HamanoMay 25, 2017
  6. Stefan BellerMay 25, 2017

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.