Git fork

t: remove test_oid_init in tests

Now that we call test_oid_init in the setup for all test scripts,
there's no point in calling it individually. Remove all of the places
where we've done so to help keep tests tidy.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Reviewed-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

authored by

brian m. carlson and committed by
Junio C Hamano
e023ff06 4feb562f

+2 -37
-3
t/lib-pack.sh
··· 35 # have hardcoded some well-known objects. See the case statements below for the 36 # complete list. 37 pack_obj () { 38 - test_oid_init 39 - 40 case "$1" in 41 # empty blob 42 $EMPTY_BLOB) ··· 121 122 # Compute and append pack trailer to "$1" 123 pack_trailer () { 124 - test_oid_init && 125 test-tool $(test_oid algo) -b <"$1" >trailer.tmp && 126 cat trailer.tmp >>"$1" && 127 rm -f trailer.tmp
··· 35 # have hardcoded some well-known objects. See the case statements below for the 36 # complete list. 37 pack_obj () { 38 case "$1" in 39 # empty blob 40 $EMPTY_BLOB) ··· 119 120 # Compute and append pack trailer to "$1" 121 pack_trailer () { 122 test-tool $(test_oid algo) -b <"$1" >trailer.tmp && 123 cat trailer.tmp >>"$1" && 124 rm -f trailer.tmp
-1
t/lib-submodule-update.sh
··· 196 # the submodule repo if it doesn't exist and configures the most problematic 197 # settings for diff.ignoreSubmodules. 198 prolog () { 199 - test_oid_init && 200 (test -d submodule_update_repo || create_lib_submodule_repo) && 201 test_config_global diff.ignoreSubmodules all && 202 test_config diff.ignoreSubmodules all
··· 196 # the submodule repo if it doesn't exist and configures the most problematic 197 # settings for diff.ignoreSubmodules. 198 prolog () { 199 (test -d submodule_update_repo || create_lib_submodule_repo) && 200 test_config_global diff.ignoreSubmodules all && 201 test_config diff.ignoreSubmodules all
-4
t/t0000-basic.sh
··· 891 test_path_is_missing also-clean-atexit 892 " 893 894 - test_expect_success 'test_oid setup' ' 895 - test_oid_init 896 - ' 897 - 898 test_expect_success 'test_oid provides sane info by default' ' 899 test_oid zero >actual && 900 grep "^00*\$" actual &&
··· 891 test_path_is_missing also-clean-atexit 892 " 893 894 test_expect_success 'test_oid provides sane info by default' ' 895 test_oid zero >actual && 896 grep "^00*\$" actual &&
-2
t/t1006-cat-file.sh
··· 140 test_cmp expect actual 141 ' 142 143 - test_oid_init 144 - 145 tree_sha1=$(git write-tree) 146 tree_size=$(($(test_oid rawsz) + 13)) 147 tree_pretty_content="100644 blob $hello_sha1 hello"
··· 140 test_cmp expect actual 141 ' 142 143 tree_sha1=$(git write-tree) 144 tree_size=$(($(test_oid rawsz) + 13)) 145 tree_pretty_content="100644 blob $hello_sha1 hello"
-1
t/t1050-large.sh
··· 12 } 13 14 test_expect_success setup ' 15 - test_oid_init && 16 # clone does not allow us to pass core.bigfilethreshold to 17 # new repos, so set core.bigfilethreshold globally 18 git config --global core.bigfilethreshold 200k &&
··· 12 } 13 14 test_expect_success setup ' 15 # clone does not allow us to pass core.bigfilethreshold to 16 # new repos, so set core.bigfilethreshold globally 17 git config --global core.bigfilethreshold 200k &&
-1
t/t1410-reflog.sh
··· 54 } 55 56 test_expect_success setup ' 57 - test_oid_init && 58 mkdir -p A/B && 59 echo rat >C && 60 echo ox >A/D &&
··· 54 } 55 56 test_expect_success setup ' 57 mkdir -p A/B && 58 echo rat >C && 59 echo ox >A/D &&
-1
t/t1450-fsck.sh
··· 9 . ./test-lib.sh 10 11 test_expect_success setup ' 12 - test_oid_init && 13 git config gc.auto 0 && 14 git config i18n.commitencoding ISO-8859-1 && 15 test_commit A fileA one &&
··· 9 . ./test-lib.sh 10 11 test_expect_success setup ' 12 git config gc.auto 0 && 13 git config i18n.commitencoding ISO-8859-1 && 14 test_commit A fileA one &&
-1
t/t1500-rev-parse.sh
··· 59 ROOT=$(pwd) 60 61 test_expect_success 'setup' ' 62 - test_oid_init && 63 mkdir -p sub/dir work && 64 cp -R .git repo.git 65 '
··· 59 ROOT=$(pwd) 60 61 test_expect_success 'setup' ' 62 mkdir -p sub/dir work && 63 cp -R .git repo.git 64 '
-1
t/t3308-notes-merge.sh
··· 22 # Copy notes to remote-notes 23 git fetch . refs/notes/*:refs/remote-notes/origin/* && 24 25 - test_oid_init && 26 test_oid_cache <<-EOF 27 hash4a sha1:5e93d24084d32e1cb61f7070505b9d2530cca987 28 hash3a sha1:8366731eeee53787d2bdf8fc1eff7d94757e8da0
··· 22 # Copy notes to remote-notes 23 git fetch . refs/notes/*:refs/remote-notes/origin/* && 24 25 test_oid_cache <<-EOF 26 hash4a sha1:5e93d24084d32e1cb61f7070505b9d2530cca987 27 hash3a sha1:8366731eeee53787d2bdf8fc1eff7d94757e8da0
-1
t/t3600-rm.sh
··· 241 ' 242 243 test_expect_success 'choking "git rm" should not let it die with cruft' ' 244 - test_oid_init && 245 git reset -q --hard && 246 test_when_finished "rm -f .git/index.lock && git reset -q --hard" && 247 i=0 &&
··· 241 ' 242 243 test_expect_success 'choking "git rm" should not let it die with cruft' ' 244 git reset -q --hard && 245 test_when_finished "rm -f .git/index.lock && git reset -q --hard" && 246 i=0 &&
-1
t/t3800-mktag.sh
··· 23 # first create a commit, so we have a valid object/type 24 # for the tag. 25 test_expect_success 'setup' ' 26 - test_oid_init && 27 echo Hello >A && 28 git update-index --add A && 29 git commit -m "Initial commit" &&
··· 23 # first create a commit, so we have a valid object/type 24 # for the tag. 25 test_expect_success 'setup' ' 26 echo Hello >A && 27 git update-index --add A && 28 git commit -m "Initial commit" &&
-2
t/t4002-diff-basic.sh
··· 10 11 . "$TEST_DIRECTORY"/lib-read-tree-m-3way.sh 12 13 - test_oid_init 14 - 15 test_oid_cache <<\EOF 16 aa_1 sha1:ccba72ad3888a3520b39efcf780b9ee64167535d 17 aa_1 sha256:9febfbf18197819b2735c45291f138525d2476d59470f98239647544586ba403
··· 10 11 . "$TEST_DIRECTORY"/lib-read-tree-m-3way.sh 12 13 test_oid_cache <<\EOF 14 aa_1 sha1:ccba72ad3888a3520b39efcf780b9ee64167535d 15 aa_1 sha256:9febfbf18197819b2735c45291f138525d2476d59470f98239647544586ba403
-1
t/t4027-diff-submodule.sh
··· 6 . "$TEST_DIRECTORY"/diff-lib.sh 7 8 test_expect_success setup ' 9 - test_oid_init && 10 test_tick && 11 test_create_repo sub && 12 (
··· 6 . "$TEST_DIRECTORY"/diff-lib.sh 7 8 test_expect_success setup ' 9 test_tick && 10 test_create_repo sub && 11 (
-1
t/t4134-apply-submodule.sh
··· 8 . ./test-lib.sh 9 10 test_expect_success setup ' 11 - test_oid_init && 12 cat > create-sm.patch <<EOF && 13 diff --git a/dir/sm b/dir/sm 14 new file mode 160000
··· 8 . ./test-lib.sh 9 10 test_expect_success setup ' 11 cat > create-sm.patch <<EOF && 12 diff --git a/dir/sm b/dir/sm 13 new file mode 160000
-1
t/t4200-rerere.sh
··· 25 . ./test-lib.sh 26 27 test_expect_success 'setup' ' 28 - test_oid_init && 29 cat >a1 <<-\EOF && 30 Some title 31 ==========
··· 25 . ./test-lib.sh 26 27 test_expect_success 'setup' ' 28 cat >a1 <<-\EOF && 29 Some title 30 ==========
-1
t/t4211-line-log.sh
··· 4 . ./test-lib.sh 5 6 test_expect_success 'setup (import history)' ' 7 - test_oid_init && 8 git fast-import < "$TEST_DIRECTORY"/t4211/history.export && 9 git reset --hard 10 '
··· 4 . ./test-lib.sh 5 6 test_expect_success 'setup (import history)' ' 7 git fast-import < "$TEST_DIRECTORY"/t4211/history.export && 8 git reset --hard 9 '
+1 -2
t/t5300-pack-object.sh
··· 12 13 test_expect_success \ 14 'setup' \ 15 - 'test_oid_init && 16 - rm -f .git/index* && 17 perl -e "print \"a\" x 4096;" > a && 18 perl -e "print \"b\" x 4096;" > b && 19 perl -e "print \"c\" x 4096;" > c &&
··· 12 13 test_expect_success \ 14 'setup' \ 15 + 'rm -f .git/index* && 16 perl -e "print \"a\" x 4096;" > a && 17 perl -e "print \"b\" x 4096;" > b && 18 perl -e "print \"c\" x 4096;" > c &&
-1
t/t5302-pack-index.sh
··· 7 . ./test-lib.sh 8 9 test_expect_success 'setup' ' 10 - test_oid_init && 11 rawsz=$(test_oid rawsz) && 12 rm -rf .git && 13 git init &&
··· 7 . ./test-lib.sh 8 9 test_expect_success 'setup' ' 10 rawsz=$(test_oid rawsz) && 11 rm -rf .git && 12 git init &&
-1
t/t5313-pack-bounds-checks.sh
··· 45 } 46 47 test_expect_success 'setup' ' 48 - test_oid_init && 49 test_oid_cache <<-EOF 50 oid000 sha1:1485 51 oid000 sha256:4222
··· 45 } 46 47 test_expect_success 'setup' ' 48 test_oid_cache <<-EOF 49 oid000 sha1:1485 50 oid000 sha256:4222
+1 -2
t/t5318-commit-graph.sh
··· 10 cd "$TRASH_DIRECTORY/full" && 11 git init && 12 git config core.commitGraph true && 13 - objdir=".git/objects" && 14 - test_oid_init 15 ' 16 17 test_expect_success POSIXPERM 'tweak umask for modebit tests' '
··· 10 cd "$TRASH_DIRECTORY/full" && 11 git init && 12 git config core.commitGraph true && 13 + objdir=".git/objects" 14 ' 15 16 test_expect_success POSIXPERM 'tweak umask for modebit tests' '
-1
t/t5319-multi-pack-index.sh
··· 29 } 30 31 test_expect_success 'setup' ' 32 - test_oid_init && 33 test_oid_cache <<-EOF 34 idxoff sha1:2999 35 idxoff sha256:3739
··· 29 } 30 31 test_expect_success 'setup' ' 32 test_oid_cache <<-EOF 33 idxoff sha1:2999 34 idxoff sha256:3739
-1
t/t5324-split-commit-graph.sh
··· 12 git config gc.writeCommitGraph false && 13 infodir=".git/objects/info" && 14 graphdir="$infodir/commit-graphs" && 15 - test_oid_init && 16 test_oid_cache <<-EOM 17 shallow sha1:1760 18 shallow sha256:2064
··· 12 git config gc.writeCommitGraph false && 13 infodir=".git/objects/info" && 14 graphdir="$infodir/commit-graphs" && 15 test_oid_cache <<-EOM 16 shallow sha1:1760 17 shallow sha256:2064
-1
t/t5504-fetch-receive-strict.sh
··· 4 . ./test-lib.sh 5 6 test_expect_success 'setup and inject "corrupt or missing" object' ' 7 - test_oid_init && 8 echo hello >greetings && 9 git add greetings && 10 git commit -m greetings &&
··· 4 . ./test-lib.sh 5 6 test_expect_success 'setup and inject "corrupt or missing" object' ' 7 echo hello >greetings && 8 git add greetings && 9 git commit -m greetings &&
-1
t/t5530-upload-pack-error.sh
··· 14 } 15 16 test_expect_success 'setup and corrupt repository' ' 17 - test_oid_init && 18 echo file >file && 19 git add file && 20 git rev-parse :file &&
··· 14 } 15 16 test_expect_success 'setup and corrupt repository' ' 17 echo file >file && 18 git add file && 19 git rev-parse :file &&
-1
t/t5562-http-backend-content-length.sh
··· 46 } 47 48 test_expect_success 'setup' ' 49 - test_oid_init && 50 HTTP_CONTENT_ENCODING="identity" && 51 export HTTP_CONTENT_ENCODING && 52 git config http.receivepack true &&
··· 46 } 47 48 test_expect_success 'setup' ' 49 HTTP_CONTENT_ENCODING="identity" && 50 export HTTP_CONTENT_ENCODING && 51 git config http.receivepack true &&
-1
t/t5702-protocol-v2.sh
··· 13 daemon_parent=$GIT_DAEMON_DOCUMENT_ROOT_PATH/parent 14 15 test_expect_success 'create repo to be served by git-daemon' ' 16 - test_oid_init && 17 git init "$daemon_parent" && 18 test_commit -C "$daemon_parent" one 19 '
··· 13 daemon_parent=$GIT_DAEMON_DOCUMENT_ROOT_PATH/parent 14 15 test_expect_success 'create repo to be served by git-daemon' ' 16 git init "$daemon_parent" && 17 test_commit -C "$daemon_parent" one 18 '
-1
t/t5703-upload-pack-ref-in-want.sh
··· 43 # \ | / 44 # a 45 test_expect_success 'setup repository' ' 46 - test_oid_init && 47 test_commit a && 48 git checkout -b o/foo && 49 test_commit b &&
··· 43 # \ | / 44 # a 45 test_expect_success 'setup repository' ' 46 test_commit a && 47 git checkout -b o/foo && 48 test_commit b &&
-1
t/t6006-rev-list-format.sh
··· 32 truncate_count=20 33 34 test_expect_success 'setup' ' 35 - test_oid_init && 36 : >foo && 37 git add foo && 38 git config i18n.commitEncoding $test_encoding &&
··· 32 truncate_count=20 33 34 test_expect_success 'setup' ' 35 : >foo && 36 git add foo && 37 git config i18n.commitEncoding $test_encoding &&