Skip to content

Commit 4bacb6d

Browse files
bk2204gitster
authored andcommitted
t7003: compute appropriate length constant
Instead of using a specific invalid hard-coded object ID, look one up from the translation table. Signed-off-by: brian m. carlson <[email protected]> Reviewed-by: Eric Sunshine <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 252a4ee commit 4bacb6d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

t/t7003-filter-branch.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,10 +463,11 @@ test_expect_success 'rewrite submodule with another content' '
463463
'
464464

465465
test_expect_success 'replace submodule revision' '
466+
invalid=$(test_oid numeric) &&
466467
git reset --hard original &&
467468
git filter-branch -f --tree-filter \
468469
"if git ls-files --error-unmatch -- submod > /dev/null 2>&1
469-
then git update-index --cacheinfo 160000 0123456789012345678901234567890123456789 submod
470+
then git update-index --cacheinfo 160000 $invalid submod
470471
fi" HEAD &&
471472
test $orig_head != $(git show-ref --hash --head HEAD)
472473
'

0 commit comments

Comments
 (0)