Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2020-07-30 02:13:59 +0300
committerJunio C Hamano <gitster@pobox.com>2020-07-30 19:16:46 +0300
commit4bacb6d50ea3aca9e44dab195b215930f2648ae3 (patch)
tree532c32a132fe5f35e2a68afd244962400518201f /t/t7003-filter-branch.sh
parent252a4ee66aa5d0d872b14095047e605367f4d34c (diff)
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>
Diffstat (limited to 't/t7003-filter-branch.sh')
-rwxr-xr-xt/t7003-filter-branch.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/t/t7003-filter-branch.sh b/t/t7003-filter-branch.sh
index e23de7d0b5..36477cb1f4 100755
--- a/t/t7003-filter-branch.sh
+++ b/t/t7003-filter-branch.sh
@@ -463,10 +463,11 @@ test_expect_success 'rewrite submodule with another content' '
'
test_expect_success 'replace submodule revision' '
+ invalid=$(test_oid numeric) &&
git reset --hard original &&
git filter-branch -f --tree-filter \
"if git ls-files --error-unmatch -- submod > /dev/null 2>&1
- then git update-index --cacheinfo 160000 0123456789012345678901234567890123456789 submod
+ then git update-index --cacheinfo 160000 $invalid submod
fi" HEAD &&
test $orig_head != $(git show-ref --hash --head HEAD)
'