diff options
Diffstat (limited to 't')
-rwxr-xr-x | t/t0021-conversion.sh | 14 | ||||
-rwxr-xr-x | t/t1508-at-combinations.sh | 2 | ||||
-rwxr-xr-x | t/t3903-stash.sh | 18 | ||||
-rwxr-xr-x | t/t4203-mailmap.sh | 16 | ||||
-rwxr-xr-x | t/t5500-fetch-pack.sh | 16 | ||||
-rwxr-xr-x | t/t7406-submodule-update.sh | 2 | ||||
-rwxr-xr-x | t/t7407-submodule-foreach.sh | 2 |
7 files changed, 47 insertions, 23 deletions
diff --git a/t/t0021-conversion.sh b/t/t0021-conversion.sh index e50f0f742f..b92e6cb046 100755 --- a/t/t0021-conversion.sh +++ b/t/t0021-conversion.sh @@ -190,4 +190,18 @@ test_expect_success 'required filter clean failure' ' test_must_fail git add test.fc ' +test -n "$GIT_TEST_LONG" && test_set_prereq EXPENSIVE + +test_expect_success EXPENSIVE 'filter large file' ' + git config filter.largefile.smudge cat && + git config filter.largefile.clean cat && + for i in $(test_seq 1 2048); do printf "%1048576d" 1; done >2GB && + echo "2GB filter=largefile" >.gitattributes && + git add 2GB 2>err && + ! test -s err && + rm -f 2GB && + git checkout -- 2GB 2>err && + ! test -s err +' + test_done diff --git a/t/t1508-at-combinations.sh b/t/t1508-at-combinations.sh index 4db1613f8a..e5aea3b896 100755 --- a/t/t1508-at-combinations.sh +++ b/t/t1508-at-combinations.sh @@ -55,8 +55,6 @@ check "HEAD@{u}" ref refs/heads/upstream-branch check "@{u}@{1}" commit upstream-one check "@{-1}@{u}" ref refs/heads/master check "@{-1}@{u}@{1}" commit master-one -check "@" commit new-two -check "@@{u}" ref refs/heads/upstream-branch nonsense "@{u}@{-1}" nonsense "@{0}@{0}" nonsense "@{1}@{u}" diff --git a/t/t3903-stash.sh b/t/t3903-stash.sh index 5d22f17ca2..debda7a678 100755 --- a/t/t3903-stash.sh +++ b/t/t3903-stash.sh @@ -673,22 +673,4 @@ test_expect_success 'store updates stash ref and reflog' ' grep quux bazzy ' -test_expect_success 'stash a change to turn a non-directory to a directory' ' - git reset --hard && - >testfile && - git add testfile && - git commit -m "add testfile as a regular file" && - rm testfile && - mkdir testfile && - >testfile/file && - test_must_fail git stash save "recover regular file" && - test -f testfile/file -' - -test_expect_success 'stash a change to turn a non-directory to a directory (forced)' ' - git stash save --force "recover regular file (forced)" && - ! test -f testfile/file && - test -f testfile -' - test_done diff --git a/t/t4203-mailmap.sh b/t/t4203-mailmap.sh index baa4685dcc..ce3eace065 100755 --- a/t/t4203-mailmap.sh +++ b/t/t4203-mailmap.sh @@ -202,7 +202,8 @@ test_expect_success 'setup mailmap blob tests' ' Blob Guy <author@example.com> Blob Guy <bugs@company.xx> EOF - git add just-bugs both && + printf "Tricky Guy <author@example.com>" >no-newline && + git add just-bugs both no-newline && git commit -m "my mailmaps" && echo "Repo Guy <author@example.com>" >.mailmap && echo "Internal Guy <author@example.com>" >internal.map @@ -286,6 +287,19 @@ test_expect_success 'mailmap.blob defaults to HEAD:.mailmap in bare repo' ' ) ' +test_expect_success 'mailmap.blob can handle blobs without trailing newline' ' + cat >expect <<-\EOF && + Tricky Guy (1): + initial + + nick1 (1): + second + + EOF + git -c mailmap.blob=map:no-newline shortlog HEAD >actual && + test_cmp expect actual +' + test_expect_success 'cleanup after mailmap.blob tests' ' rm -f .mailmap ' diff --git a/t/t5500-fetch-pack.sh b/t/t5500-fetch-pack.sh index fd2598e601..a80584ea0e 100755 --- a/t/t5500-fetch-pack.sh +++ b/t/t5500-fetch-pack.sh @@ -505,4 +505,20 @@ test_expect_success 'test --all, --depth, and explicit tag' ' ) >out-adt 2>error-adt ' +test_expect_success 'shallow fetch with tags does not break the repository' ' + mkdir repo1 && + ( + cd repo1 && + git init && + test_commit 1 && + test_commit 2 && + test_commit 3 && + mkdir repo2 && + cd repo2 && + git init && + git fetch --depth=2 ../.git master:branch && + git fsck + ) +' + test_done diff --git a/t/t7406-submodule-update.sh b/t/t7406-submodule-update.sh index b192f936bc..f0b33053ab 100755 --- a/t/t7406-submodule-update.sh +++ b/t/t7406-submodule-update.sh @@ -58,7 +58,7 @@ test_expect_success 'setup a submodule tree' ' git submodule add ../merging merging && test_tick && git commit -m "rebasing" - ) + ) && (cd super && git submodule add ../none none && test_tick && diff --git a/t/t7407-submodule-foreach.sh b/t/t7407-submodule-foreach.sh index 91d4fd1fac..be93f10cf0 100755 --- a/t/t7407-submodule-foreach.sh +++ b/t/t7407-submodule-foreach.sh @@ -145,7 +145,7 @@ test_expect_success 'use "submodule foreach" to checkout 2nd level submodule' ' git rev-parse --resolve-git-dir nested1/.git && test_must_fail git rev-parse --resolve-git-dir nested1/nested2/.git && git submodule foreach "git submodule update --init" && - git rev-parse --resolve-git-dir nested1/nested1/nested2/.git + git rev-parse --resolve-git-dir nested1/nested2/.git && test_must_fail git rev-parse --resolve-git-dir nested1/nested2/nested3/.git ) ' |