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
Junio C Hamano <gitster@pobox.com>
Date
May 25, 2017, 03:42 UTC
Message-ID
<xmqq60gpfvqj.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<CACBZZX4adLy6Xumicu3Qke=g39EEe3iBa5ShsGvTBAYFqXENPg@mail.gmail.com>
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
Show 6 quoted lines
>> The tests added by grep rely on the old content of
>> test 2 'grep correctly finds patterns in a submodule'.
>
> Sorry about the fallout.
>
>> The (whitespace broken) diff below fixes it.

Ah, then, this was an example of maintainer not doing a good job. When I see a topic that pass its own test that fails when merged to 'pu', I usually try to see where it goes wrong myself and come up with a fix in an evil merge, but this time I didn't have enough time to do so before sending out the "What's cooking" report.

Here is what I taught my merge-fix machinery to apply after mechanical merge of the two topics.

 t/t7814-grep-recurse-submodules.sh | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/t/t7814-grep-recurse-submodules.sh b/t/t7814-grep-recurse-submodules.sh
index 14eeb54b4b..7184113b9b 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 -e "(3|4)" >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 -e "(3|4)" --no-recurse-submodules >actual &&
 	test_cmp expect actual
 '
 
-- 
2.13.0-491-g71cfeddc25
Previous: Ævar Arnfjörð BjarmasonNext: Stefan Beller
Message 5 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.