3 test_description='some bundle related tests'
6 test_expect_success 'setup' '
17 test_expect_success 'annotated tags can be excluded by rev-list options' '
18 git bundle create bundle --all --since=7.Apr.2005.15:14:00.-0700 &&
19 git ls-remote bundle > output &&
21 git bundle create bundle --all --since=7.Apr.2005.15:16:00.-0700 &&
22 git ls-remote bundle > output &&
26 test_expect_success 'die if bundle file cannot be created' '
28 test_must_fail git bundle create adir --all
31 test_expect_failure 'bundle --stdin' '
32 echo master | git bundle create stdin-bundle.bdl --stdin &&
33 git ls-remote stdin-bundle.bdl >output &&
37 test_expect_failure 'bundle --stdin <rev-list options>' '
38 echo master | git bundle create hybrid-bundle.bdl --stdin tag &&
39 git ls-remote hybrid-bundle.bdl >output &&
43 test_expect_success 'empty bundle file is rejected' '
45 test_must_fail git fetch empty-bundle
48 # This triggers a bug in older versions where the resulting line (with
49 # --pretty=oneline) was longer than a 1024-char buffer.
50 test_expect_success 'ridiculously long subject in boundary' '
54 printf "%01200d\n" 0 | git commit -F - &&
56 git bundle create long-subject-bundle.bdl HEAD^..HEAD &&
57 git bundle list-heads long-subject-bundle.bdl >heads &&
59 git fetch long-subject-bundle.bdl &&
60 sed -n "/^-/{p;q;}" long-subject-bundle.bdl >boundary &&
61 grep "^-[0-9a-f]\\{40\\} " boundary
64 test_expect_success 'prerequisites with an empty commit message' '
68 git commit --allow-empty-message -m "" &&
70 git bundle create bundle HEAD^.. &&
71 git bundle verify bundle