]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t5539-fetch-http-shallow.sh
fetch, upload-pack: --deepen=N extends shallow boundary by N commits
[thirdparty/git.git] / t / t5539-fetch-http-shallow.sh
index 8e38c1be659fd7d19ca758042ab5683df91d983e..5fbf67c4468897184f46ef9ea151f1dd6ad1d8d0 100755 (executable)
@@ -120,5 +120,31 @@ test_expect_success 'fetch exclude tag one' '
        test_cmp expected actual
 '
 
+test_expect_success 'fetching deepen' '
+       test_create_repo shallow-deepen &&
+       (
+       cd shallow-deepen &&
+       test_commit one &&
+       test_commit two &&
+       test_commit three &&
+       mv .git "$HTTPD_DOCUMENT_ROOT_PATH/shallow-deepen.git" &&
+       git clone --depth 1 $HTTPD_URL/smart/shallow-deepen.git deepen &&
+       mv "$HTTPD_DOCUMENT_ROOT_PATH/shallow-deepen.git" .git &&
+       test_commit four &&
+       git -C deepen log --pretty=tformat:%s master >actual &&
+       echo three >expected &&
+       test_cmp expected actual &&
+       mv .git "$HTTPD_DOCUMENT_ROOT_PATH/shallow-deepen.git" &&
+       git -C deepen fetch --deepen=1 &&
+       git -C deepen log --pretty=tformat:%s origin/master >actual &&
+       cat >expected <<-\EOF &&
+       four
+       three
+       two
+       EOF
+       test_cmp expected actual
+       )
+'
+
 stop_httpd
 test_done