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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
Signed-off-by: Robin H. Johnson <robbat2@xxxxxxxxxx>
> -- 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@xxxxxxxxxx
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@xxxxxxxxxx>
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@xxxxxxxxx>
CC: Prathamesh Chavan <pc44800@xxxxxxxxx>
Signed-off-by: Robin H. Johnson <robbat2@xxxxxxxxxx>
---
 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

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux