summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2022-03-29 12:22:03 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2022-03-29 12:22:03 -0700
commit5fe35fcc790f6df1839ff984896f9d5e6710d012 (patch)
treec974a750116a6a13c9b53d40d447d7ee146d0bef /t
parentMerge branch 'vd/cache-bottom-fix' (diff)
parentshallow: reset commit grafts when shallow is reset (diff)
downloadtgif-5fe35fcc790f6df1839ff984896f9d5e6710d012.tar.xz
Merge branch 'jt/reset-grafts-when-resetting-shallow'
When "shallow" information is updated, we forgot to update the in-core equivalent, which has been corrected. * jt/reset-grafts-when-resetting-shallow: shallow: reset commit grafts when shallow is reset
Diffstat (limited to 't')
-rwxr-xr-xt/t5537-fetch-shallow.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/t/t5537-fetch-shallow.sh b/t/t5537-fetch-shallow.sh
index 11d5ea54a9..92948de7a0 100755
--- a/t/t5537-fetch-shallow.sh
+++ b/t/t5537-fetch-shallow.sh
@@ -161,6 +161,15 @@ test_expect_success 'fetch --update-shallow' '
)
'
+test_expect_success 'fetch --update-shallow into a repo with submodules' '
+ git init a-submodule &&
+ test_commit -C a-submodule foo &&
+ git init repo-with-sub &&
+ git -C repo-with-sub submodule add ../a-submodule a-submodule &&
+ git -C repo-with-sub commit -m "added submodule" &&
+ git -C repo-with-sub fetch --update-shallow ../shallow/.git refs/heads/*:refs/remotes/shallow/*
+'
+
test_expect_success 'fetch --update-shallow (with fetch.writeCommitGraph)' '
(
cd shallow &&