@matheusbsbs / matheus-bagliano / commits / 4bacb6d50e
Fork 0

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 <sandals@crustytoothpaste.net> Reviewed-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

brian m. carlson committed Jul 29, 2020 at 23:13 UTC 4bacb6d50ea3aca9e44dab195b215930f2648ae3
1 file changed +2 -1
t/t7003-filter-branch.sh
+2 -1
@@ -463,10 +463,11 @@ test_expect_success 'rewrite submodule with another content' '
463 '
464
465 test_expect_success 'replace submodule revision' '
466 + invalid=$(test_oid numeric) &&
467 git reset --hard original &&
468 git filter-branch -f --tree-filter \
469 "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
471 fi" HEAD &&
472 test $orig_head != $(git show-ref --hash --head HEAD)
473 '