Skip to content

Commit 76c2389

Browse files
bk2204gitster
authored andcommitted
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>
1 parent 041f5ea commit 76c2389

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

t/lib-submodule-update.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ create_lib_submodule_repo () {
139139
git revert HEAD &&
140140

141141
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 &&
143143
git commit -m "Invalid sub1 commit" &&
144144
git checkout -b valid_sub1 &&
145145
git revert HEAD &&
@@ -196,6 +196,7 @@ test_git_directory_exists() {
196196
# the submodule repo if it doesn't exist and configures the most problematic
197197
# settings for diff.ignoreSubmodules.
198198
prolog () {
199+
test_oid_init &&
199200
(test -d submodule_update_repo || create_lib_submodule_repo) &&
200201
test_config_global diff.ignoreSubmodules all &&
201202
test_config diff.ignoreSubmodules all

0 commit comments

Comments
 (0)