From: Nguyễn Thái Ngọc Duy Date: Tue, 29 Dec 2015 12:10:38 GMT Subject: [PATCH 15/20] t5500: test for shallow depth since a specific date Message-ID: <1451391043-28093-16-git-send-email-pclouds@gmail.com> In-Reply-To: <1451391043-28093-1-git-send-email-pclouds@gmail.com> Signed-off-by: Nguyễn Thái Ngọc Duy --- t/t5500-fetch-pack.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/t/t5500-fetch-pack.sh b/t/t5500-fetch-pack.sh index 3a9b775..338b46e 100755 --- a/t/t5500-fetch-pack.sh +++ b/t/t5500-fetch-pack.sh @@ -637,4 +637,22 @@ test_expect_success MINGW 'fetch-pack --diag-url c:repo' ' check_prot_path c:repo file c:repo ' +test_repo_expect_success 'clone shallow since ...' ' + 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 && + git clone --since "300000000 +0700" "file://$(pwd)/." ../shallow11 && + git -C ../shallow11 log --pretty=tformat:%s HEAD >actual && + echo three >expected && + test_cmp expected actual +' + +test_expect_success 'fetch shallow since ...' ' + git -C shallow11 fetch --since "200000000 +0700" origin && + git -C shallow11 log --pretty=tformat:%s origin/master >actual && + echo three >expected && + echo two >>expected && + test_cmp expected actual +' + test_done -- 2.3.0.rc1.137.g477eb31