@@ -14,6 +14,14 @@ test_bundle_object_count () {
1414 test " $2 " = $( grep ' ^[0-9a-f]\{40\} ' verify.out | wc -l)
1515}
1616
17+ convert_bundle_to_pack () {
18+ while read x && test -n " $x "
19+ do
20+ : ;
21+ done
22+ cat
23+ }
24+
1725test_expect_success setup '
1826 echo >file original &&
1927 git add file &&
@@ -207,13 +215,7 @@ test_expect_success 'unbundle 1' '
207215
208216test_expect_success ' bundle 1 has only 3 files ' '
209217 cd "$D" &&
210- (
211- while read x && test -n "$x"
212- do
213- :;
214- done
215- cat
216- ) <bundle1 >bundle.pack &&
218+ convert_bundle_to_pack <bundle1 >bundle.pack &&
217219 git index-pack bundle.pack &&
218220 test_bundle_object_count bundle.pack 3
219221'
@@ -230,13 +232,7 @@ test_expect_success 'bundle does not prerequisite objects' '
230232 git add file2 &&
231233 git commit -m add.file2 file2 &&
232234 git bundle create bundle3 -1 HEAD &&
233- (
234- while read x && test -n "$x"
235- do
236- :;
237- done
238- cat
239- ) <bundle3 >bundle.pack &&
235+ convert_bundle_to_pack <bundle3 >bundle.pack &&
240236 git index-pack bundle.pack &&
241237 test_bundle_object_count bundle.pack 3
242238'
@@ -434,14 +430,31 @@ test_expect_success 'fetch --dry-run' '
434430'
435431
436432test_expect_success " should be able to fetch with duplicate refspecs" '
437- mkdir dups &&
438- cd dups &&
439- git init &&
440- git config branch.master.remote three &&
441- git config remote.three.url ../three/.git &&
442- git config remote.three.fetch +refs/heads/*:refs/remotes/origin/* &&
443- git config --add remote.three.fetch +refs/heads/*:refs/remotes/origin/* &&
444- git fetch three
433+ mkdir dups &&
434+ (
435+ cd dups &&
436+ git init &&
437+ git config branch.master.remote three &&
438+ git config remote.three.url ../three/.git &&
439+ git config remote.three.fetch +refs/heads/*:refs/remotes/origin/* &&
440+ git config --add remote.three.fetch +refs/heads/*:refs/remotes/origin/* &&
441+ git fetch three
442+ )
443+ '
444+
445+ test_expect_success ' all boundary commits are excluded' '
446+ test_commit base &&
447+ test_commit oneside &&
448+ git checkout HEAD^ &&
449+ test_commit otherside &&
450+ git checkout master &&
451+ test_tick &&
452+ git merge otherside &&
453+ ad=$(git log --no-walk --format=%ad HEAD) &&
454+ git bundle create twoside-boundary.bdl master --since="$ad" &&
455+ convert_bundle_to_pack <twoside-boundary.bdl >twoside-boundary.pack &&
456+ pack=$(git index-pack --fix-thin --stdin <twoside-boundary.pack) &&
457+ test_bundle_object_count .git/objects/pack/pack-${pack##pack }.pack 3
445458'
446459
447460test_done
0 commit comments