diff mbox series

[04/11] t7001: change the style for cd according to subshell

Message ID 20200925170256.11490-5-shubhunic@gmail.com
State New
Headers show
Series Modernizing the t7001 test script | expand

Commit Message

Shubham Verma Sept. 25, 2020, 5:02 p.m. UTC
From: Shubham Verma <shubhunic@gmail.com>

In some tests there is not a proper spaces after opening paranthesis
and before cd. So, Lets change the style for cd according to subshell.

Signed-off-by: shubham verma <shubhunic@gmail.com>
---
 t/t7001-mv.sh | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comments

Eric Sunshine Sept. 25, 2020, 6:12 p.m. UTC | #1
On Fri, Sep 25, 2020 at 1:03 PM shubham verma <shubhunic@gmail.com> wrote:
> t7001: change the style for cd according to subshell
>
> In some tests there is not a proper spaces after opening paranthesis
> and before cd. So, Lets change the style for cd according to subshell.

Nits:
s/space/newline/
s/paranthesis/parenthesis/
s/So, Lets change/Change/

However, a more significant observation is that this change is
actually specific to the formatting of subshells, and has nothing to
do with placement of `cd`, so calling out `cd` in the commit message
is misleading. I'd probably drop mention of `cd` altogether and write
the commit message something like this:

    t7001: modernize subshell formatting

    Some test use an old style for formatting subshells:

        (command &&
            ...

    Update them to the modern style:

        (
            command &&
            ...

The actual patch is fine.

> Signed-off-by: shubham verma <shubhunic@gmail.com>
diff mbox series

Patch

diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index f63802442b..67585b7d94 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -503,14 +503,16 @@  test_expect_success 'moving a submodule in nested directories' '
 test_expect_success 'moving nested submodules' '
 	git commit -am "cleanup commit" &&
 	mkdir sub_nested_nested &&
-	(cd sub_nested_nested &&
+	(
+		cd sub_nested_nested &&
 		touch nested_level2 &&
 		git init &&
 		git add . &&
 		git commit -m "nested level 2"
 	) &&
 	mkdir sub_nested &&
-	(cd sub_nested &&
+	(
+		cd sub_nested &&
 		touch nested_level1 &&
 		git init &&
 		git add . &&