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 <shubhunic@gmail.com> Reviewed-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Shubham Verma committed
Feb 12, 2021 at 01:16 UTC
9bcaeb71a63e3f13b859202813d8c95047902b27
1 file changed
+40
-34
t/t7001-mv.sh
+40
-34
@@ -181,38 +181,42 @@ test_expect_success "Sergey Vlasov's test case" '
181
git mv ab a
182
'
183
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
+'
220
221
test_expect_success 'git mv to move multiple sources into a directory' '
222
rm -fr .git && git init &&
@@ -503,14 +507,16 @@ test_expect_success 'moving a submodule in nested directories' '
507
test_expect_success 'moving nested submodules' '
508
git commit -am "cleanup commit" &&
509
mkdir sub_nested_nested &&
506
- (cd sub_nested_nested &&
510
+ (
511
+ cd sub_nested_nested &&
512
touch nested_level2 &&
513
git init &&
514
git add . &&
515
git commit -m "nested level 2"
516
) &&
517
mkdir sub_nested &&
513
- (cd sub_nested &&
518
+ (
519
+ cd sub_nested &&
520
touch nested_level1 &&
521
git init &&
522
git add . &&