summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-06-25 20:22:40 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-06-25 20:22:40 (GMT)
commit208ee598612092da892ac1c0e8dd0d4e09c4f076 (patch)
tree014cf9a074e670f54a601ec2a6eb007b7555c068 /t
parentf0209e80cf4468653e7730881b4c5bdb5fc7389a (diff)
parente34de73c5653c713e6edddc5a12c8befc50d311f (diff)
downloadgit-208ee598612092da892ac1c0e8dd0d4e09c4f076.zip
git-208ee598612092da892ac1c0e8dd0d4e09c4f076.tar.gz
git-208ee598612092da892ac1c0e8dd0d4e09c4f076.tar.bz2
Merge branch 'nd/reject-empty-shallow-request'
"git fetch --shallow-since=<cutoff>" that specifies the cut-off point that is newer than the existing history used to end up grabbing the entire history. Such a request now errors out. * nd/reject-empty-shallow-request: upload-pack: reject shallow requests that would return nothing
Diffstat (limited to 't')
-rwxr-xr-xt/t5500-fetch-pack.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/t/t5500-fetch-pack.sh b/t/t5500-fetch-pack.sh
index d4f4351..8390c0a 100755
--- a/t/t5500-fetch-pack.sh
+++ b/t/t5500-fetch-pack.sh
@@ -711,6 +711,17 @@ test_expect_success 'fetch shallow since ...' '
test_cmp expected actual
'
+test_expect_success 'clone shallow since selects no commits' '
+ test_create_repo shallow-since-the-future &&
+ (
+ cd shallow-since-the-future &&
+ GIT_COMMITTER_DATE="100000000 +0700" git commit --allow-empty -m one &&
+ GIT_COMMITTER_DATE="200000000 +0700" git commit --allow-empty -m two &&
+ GIT_COMMITTER_DATE="300000000 +0700" git commit --allow-empty -m three &&
+ test_must_fail git clone --shallow-since "900000000 +0700" "file://$(pwd)/." ../shallow111
+ )
+'
+
test_expect_success 'shallow clone exclude tag two' '
test_create_repo shallow-exclude &&
(