diff options
| -rwxr-xr-x | t/t1007-hash-object.sh | 2 | ||||
| -rwxr-xr-x | t/t4041-diff-submodule-option.sh | 22 | ||||
| -rwxr-xr-x | t/t4060-diff-submodule-option-diff-format.sh | 9 | ||||
| -rwxr-xr-x | t/t7401-submodule-summary.sh | 18 |
4 files changed, 31 insertions, 20 deletions
diff --git a/t/t1007-hash-object.sh b/t/t1007-hash-object.sh index b3cf53ff8c..2cd0be7ba7 100755 --- a/t/t1007-hash-object.sh +++ b/t/t1007-hash-object.sh @@ -30,7 +30,7 @@ setup_repo() { test_repo=test push_repo() { - test_create_repo $test_repo + git init --quiet $test_repo cd $test_repo setup_repo diff --git a/t/t4041-diff-submodule-option.sh b/t/t4041-diff-submodule-option.sh index 28f9d83d4c..4d4aa1650f 100755 --- a/t/t4041-diff-submodule-option.sh +++ b/t/t4041-diff-submodule-option.sh @@ -48,11 +48,12 @@ commit_file () { git commit "$@" -m "Commit $*" >/dev/null } -test_create_repo sm1 && -add_file . foo >/dev/null - -head1=$(add_file sm1 foo1 foo2) -fullhead1=$(cd sm1; git rev-parse --verify HEAD) +test_expect_success 'setup submodule' ' + git init sm1 && + add_file . foo && + head1=$(add_file sm1 foo1 foo2) && + fullhead1=$(cd sm1 && git rev-parse --verify HEAD) +' test_expect_success 'added submodule' ' git add sm1 && @@ -235,10 +236,13 @@ test_expect_success 'typechanged submodule(submodule->blob)' ' test_cmp expected actual ' -rm -f sm1 && -test_create_repo sm1 && -head6=$(add_file sm1 foo6 foo7) -fullhead6=$(cd sm1; git rev-parse --verify HEAD) +test_expect_success 'setup submodule anew' ' + rm -f sm1 && + git init sm1 && + head6=$(add_file sm1 foo6 foo7) && + fullhead6=$(cd sm1 && git rev-parse --verify HEAD) +' + test_expect_success 'nonexistent commit' ' git diff-index -p --submodule=log HEAD >actual && cat >expected <<-EOF && diff --git a/t/t4060-diff-submodule-option-diff-format.sh b/t/t4060-diff-submodule-option-diff-format.sh index 76b83101d3..dbfeb7470b 100755 --- a/t/t4060-diff-submodule-option-diff-format.sh +++ b/t/t4060-diff-submodule-option-diff-format.sh @@ -363,9 +363,12 @@ test_expect_success 'typechanged submodule(submodule->blob)' ' diff_cmp expected actual ' -rm -f sm1 && -test_create_repo sm1 && -head6=$(add_file sm1 foo6 foo7) +test_expect_success 'setup' ' + rm -f sm1 && + git init sm1 && + head6=$(add_file sm1 foo6 foo7) +' + test_expect_success 'nonexistent commit' ' git diff-index -p --submodule=diff HEAD >actual && cat >expected <<-EOF && diff --git a/t/t7401-submodule-summary.sh b/t/t7401-submodule-summary.sh index 9c3cc4cf40..66c3ec2da2 100755 --- a/t/t7401-submodule-summary.sh +++ b/t/t7401-submodule-summary.sh @@ -38,10 +38,11 @@ commit_file () { git commit "$@" -m "Commit $*" >/dev/null } -test_create_repo sm1 && -add_file . foo >/dev/null - -head1=$(add_file sm1 foo1 foo2) +test_expect_success 'setup submodule' ' + git init sm1 && + add_file . foo && + head1=$(add_file sm1 foo1 foo2) +' test_expect_success 'added submodule' " git add sm1 && @@ -214,9 +215,12 @@ test_expect_success 'typechanged submodule(submodule->blob)' " test_cmp expected actual " -rm -f sm1 && -test_create_repo sm1 && -head6=$(add_file sm1 foo6 foo7) +test_expect_success 'setup submodule' ' + rm -f sm1 && + git init sm1 && + head6=$(add_file sm1 foo6 foo7) +' + test_expect_success 'nonexistent commit' " git submodule summary >actual && cat >expected <<-EOF && |
