aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
Diffstat (limited to 't')
-rwxr-xr-xt/t5500-fetch-pack.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/t/t5500-fetch-pack.sh b/t/t5500-fetch-pack.sh
index 4bb56c167a..c0278ef732 100755
--- a/t/t5500-fetch-pack.sh
+++ b/t/t5500-fetch-pack.sh
@@ -960,6 +960,29 @@ test_expect_success 'fetching deepen' '
)
'
+test_expect_success 'fetching deepen beyond merged branch' '
+ test_create_repo shallow-deepen-merged &&
+ (
+ cd shallow-deepen-merged &&
+ git commit --allow-empty -m one &&
+ git commit --allow-empty -m two &&
+ git commit --allow-empty -m three &&
+ git switch -c branch &&
+ git commit --allow-empty -m four &&
+ git commit --allow-empty -m five &&
+ git switch main &&
+ git merge --no-ff branch &&
+ cd - &&
+ git clone --bare --depth 3 "file://$(pwd)/shallow-deepen-merged" deepen.git &&
+ git -C deepen.git fetch origin --deepen=1 &&
+ git -C deepen.git rev-list --all >actual &&
+ for commit in $(sed "/^$/d" deepen.git/shallow)
+ do
+ test_grep "$commit" actual || exit 1
+ done
+ )
+'
+
test_negotiation_algorithm_default () {
test_when_finished rm -rf clientv0 clientv2 &&
rm -rf server client &&