Skip to content

Commit 9bcaeb7

Browse files
Shubhamlmpgitster
authored andcommitted
t7001: modernize subshell formatting
Some test use an old style for formatting subshells: (command && ... Update them to the modern style: ( command && ... Signed-off-by: Shubham Verma <[email protected]> Reviewed-by: Eric Sunshine <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 9b46e9c commit 9bcaeb7

File tree

1 file changed

+40
-34
lines changed

1 file changed

+40
-34
lines changed

t/t7001-mv.sh

Lines changed: 40 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -181,38 +181,42 @@ test_expect_success "Sergey Vlasov's test case" '
181181
git mv ab a
182182
'
183183

184-
test_expect_success 'absolute pathname' '(
185-
rm -fr mine &&
186-
mkdir mine &&
187-
cd mine &&
188-
test_create_repo one &&
189-
cd one &&
190-
mkdir sub &&
191-
>sub/file &&
192-
git add sub/file &&
193-
194-
git mv sub "$(pwd)/in" &&
195-
! test -d sub &&
196-
test -d in &&
197-
git ls-files --error-unmatch in/file
198-
)'
199-
200-
test_expect_success 'absolute pathname outside should fail' '(
201-
rm -fr mine &&
202-
mkdir mine &&
203-
cd mine &&
204-
out=$(pwd) &&
205-
test_create_repo one &&
206-
cd one &&
207-
mkdir sub &&
208-
>sub/file &&
209-
git add sub/file &&
210-
211-
test_must_fail git mv sub "$out/out" &&
212-
test -d sub &&
213-
! test -d ../in &&
214-
git ls-files --error-unmatch sub/file
215-
)'
184+
test_expect_success 'absolute pathname' '
185+
(
186+
rm -fr mine &&
187+
mkdir mine &&
188+
cd mine &&
189+
test_create_repo one &&
190+
cd one &&
191+
mkdir sub &&
192+
>sub/file &&
193+
git add sub/file &&
194+
195+
git mv sub "$(pwd)/in" &&
196+
! test -d sub &&
197+
test -d in &&
198+
git ls-files --error-unmatch in/file
199+
)
200+
'
201+
202+
test_expect_success 'absolute pathname outside should fail' '
203+
(
204+
rm -fr mine &&
205+
mkdir mine &&
206+
cd mine &&
207+
out=$(pwd) &&
208+
test_create_repo one &&
209+
cd one &&
210+
mkdir sub &&
211+
>sub/file &&
212+
git add sub/file &&
213+
214+
test_must_fail git mv sub "$out/out" &&
215+
test -d sub &&
216+
! test -d ../in &&
217+
git ls-files --error-unmatch sub/file
218+
)
219+
'
216220

217221
test_expect_success 'git mv to move multiple sources into a directory' '
218222
rm -fr .git && git init &&
@@ -503,14 +507,16 @@ test_expect_success 'moving a submodule in nested directories' '
503507
test_expect_success 'moving nested submodules' '
504508
git commit -am "cleanup commit" &&
505509
mkdir sub_nested_nested &&
506-
(cd sub_nested_nested &&
510+
(
511+
cd sub_nested_nested &&
507512
touch nested_level2 &&
508513
git init &&
509514
git add . &&
510515
git commit -m "nested level 2"
511516
) &&
512517
mkdir sub_nested &&
513-
(cd sub_nested &&
518+
(
519+
cd sub_nested &&
514520
touch nested_level1 &&
515521
git init &&
516522
git add . &&

0 commit comments

Comments
 (0)