summaryrefslogtreecommitdiff
path: root/t/t7001-mv.sh
diff options
context:
space:
mode:
authorShubham Verma <shubhunic@gmail.com>2021-02-11 19:46:58 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-02-11 21:42:16 (GMT)
commit9bcaeb71a63e3f13b859202813d8c95047902b27 (patch)
tree4045341115c3b67fd6004ac1a7937ae0f081bc0f /t/t7001-mv.sh
parent9b46e9c9cc6787cbf88d18c143006316928e3aa3 (diff)
downloadgit-9bcaeb71a63e3f13b859202813d8c95047902b27.zip
git-9bcaeb71a63e3f13b859202813d8c95047902b27.tar.gz
git-9bcaeb71a63e3f13b859202813d8c95047902b27.tar.bz2
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>
Diffstat (limited to 't/t7001-mv.sh')
-rwxr-xr-xt/t7001-mv.sh74
1 files changed, 40 insertions, 34 deletions
diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index f638024..a4a14a3 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -181,38 +181,42 @@ test_expect_success "Sergey Vlasov's test case" '
git mv ab a
'
-test_expect_success 'absolute pathname' '(
- rm -fr mine &&
- mkdir mine &&
- cd mine &&
- test_create_repo one &&
- cd one &&
- mkdir sub &&
- >sub/file &&
- git add sub/file &&
-
- git mv sub "$(pwd)/in" &&
- ! test -d sub &&
- test -d in &&
- git ls-files --error-unmatch in/file
-)'
-
-test_expect_success 'absolute pathname outside should fail' '(
- rm -fr mine &&
- mkdir mine &&
- cd mine &&
- out=$(pwd) &&
- test_create_repo one &&
- cd one &&
- mkdir sub &&
- >sub/file &&
- git add sub/file &&
-
- test_must_fail git mv sub "$out/out" &&
- test -d sub &&
- ! test -d ../in &&
- git ls-files --error-unmatch sub/file
-)'
+test_expect_success 'absolute pathname' '
+ (
+ rm -fr mine &&
+ mkdir mine &&
+ cd mine &&
+ test_create_repo one &&
+ cd one &&
+ mkdir sub &&
+ >sub/file &&
+ git add sub/file &&
+
+ git mv sub "$(pwd)/in" &&
+ ! test -d sub &&
+ test -d in &&
+ git ls-files --error-unmatch in/file
+ )
+'
+
+test_expect_success 'absolute pathname outside should fail' '
+ (
+ rm -fr mine &&
+ mkdir mine &&
+ cd mine &&
+ out=$(pwd) &&
+ test_create_repo one &&
+ cd one &&
+ mkdir sub &&
+ >sub/file &&
+ git add sub/file &&
+
+ test_must_fail git mv sub "$out/out" &&
+ test -d sub &&
+ ! test -d ../in &&
+ git ls-files --error-unmatch sub/file
+ )
+'
test_expect_success 'git mv to move multiple sources into a directory' '
rm -fr .git && git init &&
@@ -503,14 +507,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 . &&