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

Re: regression AGAIN in output of git-pull --rebase --recurse-submodules=yes --quiet

From
Robin H. Johnson <robbat2@gentoo.org>
Date
Apr 12, 2019, 07:08 UTC
Message-ID
<robbat2-20190412T063235-859985527Z@orbis-terrarum.net>
In-Reply-To
<20190410111834.GA25638@ash>
On Wed, Apr 10, 2019 at 06:18:35PM +0700, Duy Nguyen wrote:
> ...
Thanks, I tested, and had good results in almost all of my tests.

Almost all: config setting of 'pull.rebase=preserve' === $ git submodule foreach --quiet git pull --quiet origin master >/dev/null Successfully rebased and updated detached HEAD. Successfully rebased and updated detached HEAD. $ git pull --rebase --recurse-submodules=yes --quiet >/dev/null $ === Looking at git-rebase--preserve-merges.sh for this message, I think that should be a separate patch to make it respect --quiet.

> -- 8< --
(snip patch, please add my DCO signed-off-by)
Tested-by: Robin H. Johnson <robbat2@gentoo.org>
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Show 5 quoted lines
> -- 8< --
> 
> I'm a bit reluctant to follow up with a proper patch because I can't
> digest the t5572-submodule-pull.sh tests. And we definitely need to
> add a test case about --quiet to make sure it won't happen again.
Find testcase attached. Please submit in a series with your patch
-- 
Robin Hugh Johnson
Gentoo Linux: Dev, Infra Lead, Foundation Treasurer
E-Mail   : robbat2@gentoo.org
GnuPG FP : 11ACBA4F 4778E3F6 E4EDF38E B27B944E 34884E85
GnuPG FP : 7D0B3CEB E9B85B1F 825BCECF EE05E6F6 A48F6136


From a57994f2d78134936521375ba9798a1b7418e230 Mon Sep 17 00:00:00 2001
From: "Robin H. Johnson" <robbat2@gentoo.org>
Date: Fri, 12 Apr 2019 00:00:07 -0700
Subject: [PATCH] submodule foreach: test foreach option swallowing

Add a testcase for submodule foreach option parsing not knowing where to
stop taking options, and accidently removing options intended for
foreach target commands.

CC: Duy Nguyen <pclouds@gmail.com>
CC: Prathamesh Chavan <pc44800@gmail.com>
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
---
 t/t7407-submodule-foreach.sh | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/t/t7407-submodule-foreach.sh b/t/t7407-submodule-foreach.sh
index 77729ac4aa..706ae762e0 100755
--- a/t/t7407-submodule-foreach.sh
+++ b/t/t7407-submodule-foreach.sh
@@ -411,4 +411,14 @@ test_expect_success 'multi-argument command passed to foreach is not shell-evalu
 	test_cmp expected actual
 '
 
+test_expect_success 'option-like arguments passed to foreach commands are not lost' '
+	(
+		cd super &&
+		git submodule foreach "echo be --quiet" > ../expected &&
+		git submodule foreach echo be --quiet > ../actual
+	) &&
+	grep -sq -e "--quiet" expected &&
+	test_cmp expected actual
+'
+
 test_done
-- 
2.21.0
Previous: Duy NguyenNext: Duy Nguyen
Message 6 of 12 in “regression in output of git-pull --rebase --recurse-submodules=yes --quiet”
  1. Robin H. JohnsonJan 20, 2018
  2. builtin/pull: respect verbosity settings in submodulesStefan Beller, Jan 25, 2018
  3. Junio C HamanoJan 25, 2018
  4. regression AGAIN in output of git-pull --rebase --recurse-submodules=yes --quietRobin H. Johnson, Apr 10, 2019
  5. Duy NguyenApr 10, 2019
  6. Robin H. JohnsonApr 12, 2019
  7. Duy NguyenApr 12, 2019
  8. Johannes SchindelinApr 15, 2019
  9. submodule foreach: fix "<command> --quiet" not being respectedNguyễn Thái Ngọc Duy, Apr 12, 2019
  10. Robin H. JohnsonApr 12, 2019
  11. Junio C HamanoApr 15, 2019
  12. Duy NguyenApr 16, 2019

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.