3 test_description
='some bundle related tests'
6 test_expect_success
'setup' '
11 git commit -m initial &&
18 git commit -m second &&
25 test_expect_success
'tags can be excluded by rev-list options' '
27 git bundle create bundle --all --since=7.Apr.2005.15:16:00.-0700 &&
28 git ls-remote bundle > output &&
33 test_expect_success
'die if bundle file cannot be created' '
36 test_must_fail git bundle create adir --all
40 test_expect_failure
'bundle --stdin' '
42 echo master | git bundle create stdin-bundle.bdl --stdin &&
43 git ls-remote stdin-bundle.bdl >output &&
48 test_expect_failure
'bundle --stdin <rev-list options>' '
50 echo master | git bundle create hybrid-bundle.bdl --stdin tag &&
51 git ls-remote hybrid-bundle.bdl >output &&
56 test_expect_success
'empty bundle file is rejected' '
58 >empty-bundle && test_must_fail git fetch empty-bundle
62 # This triggers a bug in older versions where the resulting line (with
63 # --pretty=oneline) was longer than a 1024-char buffer.
64 test_expect_success
'ridiculously long subject in boundary' '
68 printf "%01200d\n" 0 | git commit -F - &&
70 git bundle create long-subject-bundle.bdl HEAD^..HEAD &&
71 git bundle list-heads long-subject-bundle.bdl >heads &&
73 git fetch long-subject-bundle.bdl &&
74 sed -n "/^-/{p;q}" long-subject-bundle.bdl >boundary &&
75 grep "^-$_x40 " boundary