t/lib-submodule-update: use appropriate length constant
Instead of using a specific invalid hard-coded object ID, produce one of the appropriate length by using test_oid. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
brian m. carlson committed
Feb 19, 2019 at 00:04 UTC
76c23892bcbc5e8fba1f6d844b05752082d0542e
1 file changed
+2
-1
t/lib-submodule-update.sh
+2
-1
@@ -139,7 +139,7 @@ create_lib_submodule_repo () {
139
git revert HEAD &&
140
141
git checkout -b invalid_sub1 add_sub1 &&
142
- git update-index --cacheinfo 160000 0123456789012345678901234567890123456789 sub1 &&
142
+ git update-index --cacheinfo 160000 $(test_oid numeric) sub1 &&
143
git commit -m "Invalid sub1 commit" &&
144
git checkout -b valid_sub1 &&
145
git revert HEAD &&
@@ -196,6 +196,7 @@ test_git_directory_exists() {
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