@@ -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 &&
@@ -206,13 +214,7 @@ test_expect_success 'unbundle 1' '
206214
207215test_expect_success ' bundle 1 has only 3 files ' '
208216 cd "$D" &&
209- (
210- while read x && test -n "$x"
211- do
212- :;
213- done
214- cat
215- ) <bundle1 >bundle.pack &&
217+ convert_bundle_to_pack <bundle1 >bundle.pack &&
216218 git index-pack bundle.pack &&
217219 test_bundle_object_count bundle.pack 3
218220'
@@ -229,13 +231,7 @@ test_expect_success 'bundle does not prerequisite objects' '
229231 git add file2 &&
230232 git commit -m add.file2 file2 &&
231233 git bundle create bundle3 -1 HEAD &&
232- (
233- while read x && test -n "$x"
234- do
235- :;
236- done
237- cat
238- ) <bundle3 >bundle.pack &&
234+ convert_bundle_to_pack <bundle3 >bundle.pack &&
239235 git index-pack bundle.pack &&
240236 test_bundle_object_count bundle.pack 3
241237'
@@ -433,14 +429,31 @@ test_expect_success 'fetch --dry-run' '
433429'
434430
435431test_expect_success " should be able to fetch with duplicate refspecs" '
436- mkdir dups &&
437- cd dups &&
438- git init &&
439- git config branch.master.remote three &&
440- git config remote.three.url ../three/.git &&
441- git config remote.three.fetch +refs/heads/*:refs/remotes/origin/* &&
442- git config --add remote.three.fetch +refs/heads/*:refs/remotes/origin/* &&
443- git fetch three
432+ mkdir dups &&
433+ (
434+ cd dups &&
435+ git init &&
436+ git config branch.master.remote three &&
437+ git config remote.three.url ../three/.git &&
438+ git config remote.three.fetch +refs/heads/*:refs/remotes/origin/* &&
439+ git config --add remote.three.fetch +refs/heads/*:refs/remotes/origin/* &&
440+ git fetch three
441+ )
442+ '
443+
444+ test_expect_success ' all boundary commits are excluded' '
445+ test_commit base &&
446+ test_commit oneside &&
447+ git checkout HEAD^ &&
448+ test_commit otherside &&
449+ git checkout master &&
450+ test_tick &&
451+ git merge otherside &&
452+ ad=$(git log --no-walk --format=%ad HEAD) &&
453+ git bundle create twoside-boundary.bdl master --since="$ad" &&
454+ convert_bundle_to_pack <twoside-boundary.bdl >twoside-boundary.pack &&
455+ pack=$(git index-pack --fix-thin --stdin <twoside-boundary.pack) &&
456+ test_bundle_object_count .git/objects/pack/pack-${pack##pack }.pack 3
444457'
445458
446459test_done
0 commit comments